Included in CMS-generated email templates for a NotifyUsersWorkflowAction.
Allows users to select a link in an email for direct access to the transition-selection dropdown in the CMS UI.

@return string
969414
public function LinkToPendingItems()
    {
        $urlBase = Director::absoluteBaseURL();
        $urlFrag = 'admin/workflows/WorkflowDefinition/EditForm/field';
        $urlInst = $this->getWorkflowInstance();
        return Controller::join_links($urlBase, $urlFrag, 'PendingObjects', 'item', $urlInst->ID, 'edit');
    }
38781
public function AbsoluteEditLink()
    {
        $CMSEditLink = null;

        if ($this->owner instanceof CMSPreviewable) {
            $CMSEditLink = $this->owner->CMSEditLink();
        } elseif ($this->owner->hasMethod('WorkflowLink')) {
            $CMSEditLink = $this->owner->WorkflowLink();
        }

        if ($CMSEditLink === null) {
            return null;
        }

        return Controller::join_links(Director::absoluteBaseURL(), $CMSEditLink);
    }
461709
protected function guessEmailVerificationBroker(): string
    {
        $accessarea = str_before(Route::currentRouteName(), '.');
        $emailVerificationBroker = str_plural(mb_strstr($accessarea, 'area', true));

        return config('auth.passwords.'.$emailVerificationBroker) ? $emailVerificationBroker : config('auth.defaults.passwords');
    }
504374
protected function sendActivationEmail()
    {
        $forum = Podium::getInstance()->podiumConfig->get('name');
        $email = Content::fill(Content::EMAIL_REGISTRATION);
        if ($email !== false) {
            $link = Url::to(['account/activate', 'token' => $this->activation_token], true);
            return Email::queue(
                $this->email,
                str_replace('{forum}', $forum, $email->topic),
                str_replace('{forum}', $forum, str_replace('{link}',
                    Html::a($link, $link), $email->content)),
                !empty($this->id) ? $this->id : null
            );
        }
        return false;
    }
1140704
public function LinkForm()
    {
        $this->getLinkObject();

        $action = FormAction::create('doSaveLink', _t('Linkable.SAVE', 'Save'))
            ->setUseButtonTag('true');

        if (!$this->isFrontend) {
            $action
                ->addExtraClass('ss-ui-action-constructive')
                ->setAttribute('data-icon', 'accept');
        }

        $link = null;
        if ($linkID = (int)$this->request->getVar('LinkID')) {
            $link = Link::get()->byID($linkID);
        }

        $link = $link ? $link : singleton(Link::class);
        $link->setAllowedTypes($this->getAllowedTypes());

        /** @var $fields FieldList */
        $fields = $link->getCMSFields();

        $title = $link ? _t('Linkable.EDITLINK', 'Edit Link') : _t('Linkable.ADDLINK', 'Add Link');
        $fields->insertBefore(
            _t('Linkable.TITLE', 'Title'), HeaderField::create('LinkHeader', $title)
        );

        $actions = FieldList::create($action);
        $form = Form::create($this, 'LinkForm', $fields, $actions);

        if ($link) {
            $form->loadDataFrom($link);
            $fields->push(HiddenField::create('LinkID', 'LinkID', $link->ID));
        }

        $this->owner->extend('updateLinkForm', $form);

        return $form;
    }
913309
public function definition () {
        global $CFG, $COURSE;

        $mform = $this->_form;

        $choices = array();
        $choices['0'] = get_string('emaildigestoff');
        $choices['1'] = get_string('emaildigestcomplete');
        $choices['2'] = get_string('emaildigestsubjects');
        $mform->addElement('select', 'maildigest', get_string('emaildigest'), $choices);
        $mform->setDefault('maildigest', core_user::get_property_default('maildigest'));
        $mform->addHelpButton('maildigest', 'emaildigest');

        $choices = array();
        $choices['1'] = get_string('autosubscribeyes');
        $choices['0'] = get_string('autosubscribeno');
        $mform->addElement('select', 'autosubscribe', get_string('autosubscribe'), $choices);
        $mform->setDefault('autosubscribe', core_user::get_property_default('autosubscribe'));

        if (!empty($CFG->forum_trackreadposts)) {
            $mform->addElement('header', 'trackreadposts', get_string('trackreadposts_header', 'mod_forum'));
            $choices = array();
            $choices['0'] = get_string('trackforumsno');
            $choices['1'] = get_string('trackforumsyes');
            $mform->addElement('select', 'trackforums', get_string('trackforums'), $choices);
            $mform->setDefault('trackforums', core_user::get_property_default('trackforums'));

            $choices = [
                1   => get_string('markasreadonnotificationyes', 'mod_forum'),
                0   => get_string('markasreadonnotificationno', 'mod_forum'),
            ];
            $mform->addElement('select', 'markasreadonnotification', get_string('markasreadonnotification', 'mod_forum'), $choices);
            $mform->addHelpButton('markasreadonnotification', 'markasreadonnotification', 'mod_forum');
            $mform->disabledIf('markasreadonnotification', 'trackforums', 'eq', "0");
            $mform->setDefault('markasreadonnotification', 1);
        }

        // Add some extra hidden fields.
        $mform->addElement('hidden', 'id');
        $mform->setType('id', PARAM_INT);
        $mform->addElement('hidden', 'course', $COURSE->id);
        $mform->setType('course', PARAM_INT);

        $this->add_action_buttons(true, get_string('savechanges'));
    }
1122882
public function forTemplate()
    {
        if ($this->LinkURL) {
            $link = $this->renderWith([
                // Render link with this template if its found. eg Link_button.ss
                Link::class . '_' . $this->Template,
                Link::class
            ]);

            // Legacy. Recommended to use templating above.
            $this->extend('updateLinkTemplate', $this, $link);

            return $link;
        }

        return '';
    }
654212
public function GetActiveSettingAsHiddenInputField()
    {
        $sHTML = '';
        if (is_array($this->aActiveFilterData)) {
            reset($this->aActiveFilterData);
            foreach ($this->aActiveFilterData as $sItemName) {
                $sHTML .= '<input type="hidden" name="'.TGlobal::OutHTML($this->GetURLInputName()).'[]" value="'.TGlobal::OutHTML($sItemName).'" />';
            }
            reset($this->aActiveFilterData);
        }

        return $sHTML;
    }
174342
public function EmailShareLink()
    {
        if (!$this->owner->hasMethod('AbsoluteLink')) {
            return false;
        }
        $pageURL = $this->owner->AbsoluteLink();
        $subject = rawurlencode(_t('JonoM\ShareCare\ShareCare.EmailSubject', 'Thought you might like this'));
        $body = rawurlencode(_t('JonoM\ShareCare\ShareCare.EmailBody', 'Thought of you when I found this: {URL}', array('URL' => $pageURL)));

        return ($pageURL) ? "mailto:?subject=$subject&body=$body" : false;
    }
91320
public function getHTML()
    {
        $html = '';
        switch (arg('action'))
        {
            case 'add':
                $html = $this->actionAddDialog();
                break;

            case 'create':
                $html = $this->actionCreate();
                break;

            default:

                switch (true)
                {
                    case arg('edit'):
                        $html = $this->actionEditDialog(arg('edit'));
                        break;

                    case arg('update'):
                        $html = $this->actionUpdate();
                        break;

                    case arg('delete'):
                        $this->actionDelete(arg('delete'));
                        break;

                    default:
                        $html = $this->actionIndex();
                }
                break;
        }
        return $html;
    }
385948
public function CMSEditLink() {
        return Controller::join_links(
            Controller::curr()->Link(),
            'EditForm',
            'field',
            $this->ClassName,
            'item',
            $this->ID
        );
    }
602009
public function getPreviewActionAttribute()
    {
        if ($this->changedModel
            && $this->changedModel->uri
            && $this->action != 'deleted') {
            return sprintf('<a href="%s" target="_blank"
                class="glyphicon glyphicon-bookmark js-tooltip"
                title="%s" data-placement="left"></a>',
                $this->preview_url,
                __('decoy::changes.standard_list.preview'));
        } else {
            return '<span class="glyphicon glyphicon-bookmark disabled"></span>';
        }
    }
10145
public function activationEmailResendAction() 
	{
	    $classifiedService = $this->getServiceLocator()->get('document.service.classified');
		
		try {
			$ids = $classifiedService->activationEmailResend(1);
			$data = array(
				'status' => 'success',
				'message' => implode(", ", $ids)
			);
		} catch(\Exception $e) {
			$this->getResponse()
				->setStatusCode(Response::STATUS_CODE_500);
			$data = array(
				'status' => 'danger',
				'message' => $e->getMessage()
			);
		}
		
		return new JsonModel($data);
	}
411128
public function getWorkflowFields()
    {
        $action    = $this->CurrentAction();
        $options   = $this->validTransitions();
        $wfOptions = $options->map('ID', 'Title', ' ');
        $fields    = new FieldList();

        $fields->push(new HeaderField('WorkflowHeader', $action->Title));

        $fields->push(HiddenField::create('TransitionID', ''));
        // Let the Active Action update the fields that the user can interact with so that data can be
        // stored for the workflow.
        $action->updateWorkflowFields($fields);
        $action->invokeWithExtensions('updateWorkflowFields', $fields);
        return $fields;
    }
200066
public function get_content_plain() {
		return wc_get_template_html( $this->template_plain, [
			'order'         => $this->object,
			'email_heading' => $this->get_heading(),
			'sent_to_admin' => false,
			'plain_text'    => true,
			'email'			=> $this,
		] );
	}
490750
public function getEmailTemplateDropdownValues()
    {
        $templates = [];

        $finder = new FileFinder();
        $finder->setOption('name_regex', '/^.*\.ss$/');

        $parent = $this->getFormParent();

        if (!$parent) {
            return [];
        }

        $emailTemplateDirectory = $parent->config()->get('email_template_directory');
        $templateDirectory = ModuleResourceLoader::resourcePath($emailTemplateDirectory);

        if (!$templateDirectory) {
            return [];
        }

        $found = $finder->find(BASE_PATH . DIRECTORY_SEPARATOR . $templateDirectory);

        foreach ($found as $key => $value) {
            $template = pathinfo($value);
            $absoluteFilename = $template['dirname'] . DIRECTORY_SEPARATOR . $template['filename'];

            // Optionally remove vendor/ path prefixes
            $resource = ModuleResourceLoader::singleton()->resolveResource($emailTemplateDirectory);
            if ($resource instanceof ModuleResource && $resource->getModule()) {
                $prefixToStrip = $resource->getModule()->getPath();
            } else {
                $prefixToStrip = BASE_PATH;
            }
            $templatePath = substr($absoluteFilename, strlen($prefixToStrip) + 1);

            // Optionally remove "templates/" prefixes
            if (preg_match('/(?<=templates\/).*$/', $templatePath, $matches)) {
                $templatePath = $matches[0];
            }

            $templates[$templatePath] = $template['filename'];
        }

        return $templates;
    }
203536
public function getAmazonChangePaymentLink()
    {
        $oClient = $this->_getContainer()->getClient();
        //Main part of the link related to selected locale in config
        $sLink = $oClient->getAmazonProperty('sAmazonPayChangeLink', true);

        //Send GetOrderReferenceDetails request to Amazon to get OrderLanguage string
        $oData = $oClient->getOrderReferenceDetails($this, array(), true);

        //If we have language string add it to link
        if (!empty($oData->GetOrderReferenceDetailsResult->OrderReferenceDetails->OrderLanguage)) {
            $sAmazonLanguageString = (string)$oData->GetOrderReferenceDetailsResult->OrderReferenceDetails->OrderLanguage;
            $sLink .= str_replace('-', '_', $sAmazonLanguageString);
        }

        return $sLink;
    }