Returns help_links in a format readable by a template
@return ArrayList
772450
public function getHelpLinks()
    {
        $helpLinks = $this->config()->get('help_links');
        $formattedLinks = [];

        $helpLink = $this->config()->get('help_link');
        if ($helpLink) {
            Deprecation::notice('5.0', 'Use $help_links instead of $help_link');
            $helpLinks['CMS User help'] = $helpLink;
        }

        foreach ($helpLinks as $key => $value) {
            $translationKey = str_replace(' ', '', $key);

            $formattedLinks[] = [
                'Title' => _t(__CLASS__ . '.' . $translationKey, $key),
                'URL' => $value
            ];
        }

        return ArrayList::create($formattedLinks);
    }
625910
public static function getList()
    {
        return [
            static::CHOICE,
            static::CLOZE,
            static::GRAPHIC,
            static::MATCH,
            static::PAIR,
            static::SET,
            static::WORDS,
            static::OPEN,
            static::SELECTION,
            static::GRID,
            static::CONTENT,
            static::ORDERING,
            static::BOOLEAN,
        ];
    }
1172830
protected function help()
    {
        $out = [];

        if (isset($this->manifest->help) && is_string($this->manifest->help)) {
            return (string) $this->manifest->help;
        }

        if (empty($this->manifest->help->file)) {
            $files = $this->helpNames;
        } else {
            $files = $this->manifest->help->file;
        }

        foreach ((array) $files as $file) {
            $file = $this->path($file);

            if (file_exists($file) && is_file($file) && is_readable($file)) {
                $out[strtolower($file)] = file_get_contents($file);
            }
        }

        return implode("\n\n", $out);
    }
902613
public function pages()
    {
        $links[] = [__d('me_cms', 'List pages'), [
            'controller' => 'Pages',
            'action' => 'index',
            'plugin' => 'MeCms',
            'prefix' => ADMIN_PREFIX,
        ]];

        //Only admins and managers can access these actions
        if ($this->Auth->isGroup(['admin', 'manager'])) {
            $links[] = [__d('me_cms', 'Add page'), [
                'controller' => 'Pages',
                'action' => 'add',
                'plugin' => 'MeCms',
                'prefix' => ADMIN_PREFIX,
            ]];
            $links[] = [__d('me_cms', 'List categories'), [
                'controller' => 'PagesCategories',
                'action' => 'index',
                'plugin' => 'MeCms',
                'prefix' => ADMIN_PREFIX,
            ]];
            $links[] = [__d('me_cms', 'Add category'), [
                'controller' => 'PagesCategories',
                'action' => 'add',
                'plugin' => 'MeCms',
                'prefix' => ADMIN_PREFIX,
            ]];
        }

        $links[] = [__d('me_cms', 'List static pages'), [
            'controller' => 'Pages',
            'action' => 'indexStatics',
            'plugin' => 'MeCms',
            'prefix' => ADMIN_PREFIX,
        ]];

        return [$links, I18N_PAGES, ['icon' => 'far copy']];
    }
23888
protected function fieldfillers() {

		$fieldrender = $this->fieldrender();

		if ($this->hintrenderer !== null) {
			$callable = &$this->hintrenderer;
			$hintsrender = $callable($this->hints());
		}
		else { # no hint renderer
			$hintsrender = null;
		}

		if ($this->showerrors && $this->errorrenderer) {
			$callable = &$this->errorrenderer;
			$errorrrender = $callable($this->errors());
		}
		else { # no error renderer
			$errorrrender = null;
		}

		return array
			(
				':id'     => $this->get('id', null),
				':field'  => $fieldrender,
				':label'  => $this->fieldlabel(),
				':hints'  => $hintsrender,
				':errors' => $errorrrender,
			);
	}
1039407
private function _getTemplateList()
    {
        $dirlist = CommonFunctions::gdc(PSI_APP_ROOT.'/templates/');
        sort($dirlist);
        foreach ($dirlist as $file) {
            $tpl_ext = substr($file, strlen($file) - 4);
            $tpl_name = substr($file, 0, strlen($file) - 4);
            if ($tpl_ext === ".css") {
                if (preg_match("/(\S+)_bootstrap$/", $tpl_name, $ar_buf)) {
                    array_push($this->_bootstrap_templates, $ar_buf[1]);
                } else {
                    array_push($this->_templates, $tpl_name);
                }
            }
        }
    }
1292327
public function getViewHelperConfig()
    {
        return array(
            'invokables'            => array(
                'layout'                    => 'Zork\View\Helper\Layout',
                'messenger'                 => 'Zork\View\Helper\Messenger',
                'htmlTag'                   => 'Zork\View\Helper\HtmlTag',
                'headTitle'                 => 'Zork\View\Helper\HeadTitle',
                'openGraph'                 => 'Zork\View\Helper\OpenGraph',
                'escapeCss'                 => 'Zork\View\Helper\EscapeCss',
                'escapeHtml'                => 'Zork\View\Helper\EscapeHtml',
                'escapeHtmlAttr'            => 'Zork\View\Helper\EscapeHtmlAttr',
                'escapeJs'                  => 'Zork\View\Helper\EscapeJs',
                'escapeUrl'                 => 'Zork\View\Helper\EscapeUrl',
                'date'                      => 'Zork\I18n\View\Helper\Date',
                'dateTime'                  => 'Zork\I18n\View\Helper\DateTime',
                'relativeTime'              => 'Zork\I18n\View\Helper\RelativeTime',
                'form'                      => 'Zork\Form\View\Helper\Form',
                'formRadio'                 => 'Zork\Form\View\Helper\FormRadio',
                'formSelect'                => 'Zork\Form\View\Helper\FormSelect',
                'formCheckbox'              => 'Zork\Form\View\Helper\FormCheckbox',
                'formPassword'              => 'Zork\Form\View\Helper\FormPassword',
                'formRadioGroup'            => 'Zork\Form\View\Helper\FormRadioGroup',
                'formElement'               => 'Zork\Form\View\Helper\FormElement',
                'formFieldset'              => 'Zork\Form\View\Helper\FormFieldset',
                'formCollection'            => 'Zork\Form\View\Helper\FormCollection',
                'formMultiCheckbox'         => 'Zork\Form\View\Helper\FormMultiCheckbox',
                'formMultiCheckboxGroup'    => 'Zork\Form\View\Helper\FormMultiCheckboxGroup',
                'captcha/regeneratable'     => 'Zork\Form\View\Helper\Captcha\Regeneratable',
                'markdown'                  => 'Grid\Core\View\Helper\Markdown',
            ),
            'aliases'               => array(
                'Zend\Session\SessionManager'   => 'sessionManager',
                'Zend\Session\ManagerInterface' => 'sessionManager',
            ),
            'factories'             => array(
                'sessionManager'    => array( $this, 'getSessionManager' ),
                'config'            => array( $this, 'getConfigViewHelper' ),
                'domain'            => array( $this, 'getDomainViewHelper' ),
                'locale'            => array( $this, 'getLocaleViewHelper' ),
                'adminLocale'       => array( $this, 'getAdminLocaleViewHelper' ),
                'appService'        => array( $this, 'getAppServiceViewHelper' ),
                'authentication'    => array( $this, 'getAuthenticationViewHelper' ),
                'viewWidget'        => array( $this, 'getViewWidgetViewHelper' ),
                'isModuleLoaded'    => array( $this, 'getIsModuleLoadedViewHelper' ),
                'siteInfo'          => array( $this, 'getSiteInfoViewHelper' ),
                'uploads'           => array( $this, 'getUploadsViewHelper' ),
                'rowSet'            => array( $this, 'getRowSetViewHelper' ),
                'beforeContentWidget' => array( $this, 'getBeforeContentWidgetViewHelper' ),
            ),
        );
    }
893425
public function getPreviewLinks()
    {
        $links = [];

        // Preview draft
        $stage = $this->getObjectInStage(Versioned::DRAFT);
        if ($stage instanceof CMSPreviewable && $stage->canView() && ($link = $stage->PreviewLink())) {
            $links[Versioned::DRAFT] = [
                'href' => Controller::join_links($link, '?stage=' . Versioned::DRAFT),
                'type' => $stage->getMimeType(),
            ];
        }

        // Preview live if versioned
        if ($this->isVersioned()) {
            $live = $this->getObjectInStage(Versioned::LIVE);
            if ($live instanceof CMSPreviewable && $live->canView() && ($link = $live->PreviewLink())) {
                $links[Versioned::LIVE] = [
                'href' => Controller::join_links($link, '?stage=' . Versioned::LIVE),
                'type' => $live->getMimeType(),
                ];
            }
        }

        return $links;
    }
862275
protected function getTemplateQtiVariables(){
        // this is necessary because the QTI template gets a serialized string for attributes and cannot address a specific attribute
        $tooltipId = $this->getAttributeValue('aria-describedby');

        $variables = parent::getTemplateQtiVariables();
        $variables['tooltipId'] = $tooltipId;
        $variables['content'] = (string) $this->getContent();
        return $variables;
    }
811346
protected function getPageLinkTypes()
    {
        $result = [];

        $apiResult = Event::fire('backend.richeditor.listTypes');
        if (is_array($apiResult)) {
            foreach ($apiResult as $typeList) {
                if (!is_array($typeList)) {
                    continue;
                }

                foreach ($typeList as $typeCode => $typeName) {
                    $result[$typeCode] = $typeName;
                }
            }
        }

        return $result;
    }
887408
public function get_links() {
        global $USER;
        $links = array();

        if (!isloggedin() || isguestuser()) {
            return $links;
        }

        $tagname = $this->get_display_name();
        $systemcontext = context_system::instance();

        // Add a link for users to add/remove this from their interests.
        if (static::is_enabled('core', 'user') && core_tag_area::get_collection('core', 'user') == $this->tagcollid) {
            if (static::is_item_tagged_with('core', 'user', $USER->id, $this->name)) {
                $url = new moodle_url('/tag/user.php', array('action' => 'removeinterest',
                    'sesskey' => sesskey(), 'tag' => $this->rawname));
                $links[] = html_writer::link($url, get_string('removetagfrommyinterests', 'tag', $tagname),
                        array('class' => 'removefrommyinterests'));
            } else {
                $url = new moodle_url('/tag/user.php', array('action' => 'addinterest',
                    'sesskey' => sesskey(), 'tag' => $this->rawname));
                $links[] = html_writer::link($url, get_string('addtagtomyinterests', 'tag', $tagname),
                        array('class' => 'addtomyinterests'));
            }
        }

        // Flag as inappropriate link.  Only people with moodle/tag:flag capability.
        if (has_capability('moodle/tag:flag', $systemcontext)) {
            $url = new moodle_url('/tag/user.php', array('action' => 'flaginappropriate',
                'sesskey' => sesskey(), 'id' => $this->id));
            $links[] = html_writer::link($url, get_string('flagasinappropriate', 'tag', $tagname),
                        array('class' => 'flagasinappropriate'));
        }

        // Edit tag: Only people with moodle/tag:edit capability who either have it as an interest or can manage tags.
        if (has_capability('moodle/tag:edit', $systemcontext) ||
                has_capability('moodle/tag:manage', $systemcontext)) {
            $url = new moodle_url('/tag/edit.php', array('id' => $this->id));
            $links[] = html_writer::link($url, get_string('edittag', 'tag'),
                        array('class' => 'edittag'));
        }

        return $links;
    }
714628
public function getListTemplate()
    {
        if (null === $this->listTemplate) {
            $template = rtrim($this->getTemplatePrefix(), '/') . '/' . $this->getListSuffix();
            $this->setListTemplate($template);
        }

        return $this->listTemplate;
    }
1008097
public function generateCollectionLinks()
    {
        $links = [
            'self' => $this->getPaginator()->getSelf(),
        ];

        if ($first = $this->getPaginator()->getFirst()) {
            $links['first'] = $first;
        }

        if ($previous = $this->getPaginator()->getPrevious()) {
            $links['previous'] = $previous;
        }

        if ($next = $this->getPaginator()->getNext()) {
            $links['next'] = $next;
        }

        if ($last = $this->getPaginator()->getLast()) {
            $links['last'] = $last;
        }

        return $links;
    }
1032736
public function getLinks()
    {
        $links = array();
        foreach($this->links as $rel => $href) {
            $simple_rel = $rel;
            $base_uris = array("fx:", static::LINK_RELATIONSHIPS_BASE_URI);
            foreach($base_uris as $base_uri) {
                $pos = strpos($simple_rel, $base_uri);
                if ($pos !== FALSE && ($simple_rel.'/' != $base_uri)) {
                    $simple_rel = substr($simple_rel, strlen($base_uri));
                }
            }
            $links[$simple_rel] = $href;
        }
        return $links;
    }
376579
public function getLinks()
    {
        if (!isset($this->_links)) {
            $this->_links = array();

            foreach ($this->_resources as $resource) {
                $link = $resource->getLink();

                if ($link) {
                    $this->_links[] = new AnConfig(array(
                        'child' => $resource->getColumn($link->child),
                        'parent' => $this->main()->getColumn($link->parent),
                        'resource' => $resource,
                    ));
                }
            }
        }

        return $this->_links;
    }
18536
public function getLinks()
    {
        $links = '';
        foreach ($this->links as $link) {
            $links .= $link . "\n";
        }
        $links = rtrim($links, "\n");
        return $links;
    }
706780
public function getLinks() : Array
    {
        if( ! $this->isJsonCheck() || $this->refresh === true )
        {
            $result = $this->getApiResult();

            if( ! is_object($result) )
            {
                throw new Exception\BadRequestURLException($this->address);
            }

            $this->putJsonContent($result);
        }

        $result = $this->decodeArrrayJsonContent();

        return $this->convertArrayByKeyValues($result);
    }