Generates the 'plugins' page.

@return string
187300
public function generatePluginListing()
    {
        $html = $this->generateHeader('Plugins');

        $html .= '<section><h1>Plugins</h1>';
        $html .= '<table class="propTable">';
        foreach ($this->server->getPlugins() as $plugin) {
            $info = $plugin->getPluginInfo();
            $html .= '<tr><th>'.$info['name'].'</th>';
            $html .= '<td>'.$info['description'].'</td>';
            $html .= '<td>';
            if (isset($info['link']) && $info['link']) {
                $html .= '<a href="'.$this->escapeHTML($info['link']).'"><span class="oi" data-glyph="book"></span></a>';
            }
            $html .= '</td></tr>';
        }
        $html .= '</table>';
        $html .= '</section>';

        /* Start of generating actions */

        $html .= $this->generateFooter();

        return $html;
    }
1104162
public function renderPluginParams()
    {
        /** @var Extension $entity */
        $tabNav     = [];
        $tabContent = [];
        $entity     = $this->_View->get('entity');
        $params     = Plugin::getData($entity->getName(), 'params');
        foreach ($params->getArrayCopy() as $title => $_params) {
            $fields   = [];
            $_params  = new Data($_params);
            $tabId    = 'tab-' . Str::slug($title);
            $tabNav[] = $this->_View->element('Extensions.Params/tab', [
                'title'  => $title,
                'params' => $_params,
                'tabId'  => $tabId
            ]);

            foreach ($_params as $key => $options) {
                $fieldName = Str::clean('params.' . $key);
                if (is_callable($options)) {
                    $fields[] = call_user_func($options, $this->_View);
                    continue;
                }
                
                if (isset($options['options']) && is_callable($options['options'])) {
                    $options['options'] = call_user_func($options['options'], $this->_View);
                }

                $fields[] = $this->_View->Form->control($fieldName, $options);
            }

            $tabContent[$tabId] = implode(PHP_EOL, $fields);
        }

        return implode(PHP_EOL, [
            $this->_View->element('Extensions.Params/list', ['items' => $tabNav]),
            $this->_View->element('Extensions.Params/content', ['content' => $tabContent])
        ]);
    }
268995
static function plugins()
    {
        if (! self::isEnabledPlugins() )
            throw new \Exception('Using Plugins depends on Poirot/Ioc; that not exists currently.');


        if (! self::$pluginManager )
            self::$pluginManager = new PluginsHttpHeader;

        return self::$pluginManager;
    }
423336
public function generateEntriesFromTypoScript()
    {
        $urlEntries = $this->pluginConfig['urlEntries'];
        foreach ($urlEntries as $urlEntry) {
            if (!empty($urlEntry['active'])) {
                $this->mapToEntries($urlEntry);
            }
        }
    }
208246
public function render_ignored_plugins() {
		$plugins = get_plugins();
		$plugins = array_map( function( $key, $value ) {
			if ( false === strpos( $key, '/' ) ) {
				$slug = basename( $key, '.php' );
			} else {
				$slug = dirname( $key );
			}

			return [
				'name' => $value['Name'],
				'slug' => $slug,
			];
		}, array_keys( $plugins ), $plugins );

		echo $this->template->render( 'options/ignored-packages.php', [ // WPCS: XSS OK.
			'ignored_packages' => $this->options->ignored_plugins,
			'packages' => $plugins,
			'type' => 'plugins',
		] );
	}
944646
public function list_plugins()
    {
        $plugins    = array();
        $plugin_dir = INSTALL_PATH . 'plugins/';

        foreach (glob($plugin_dir . '*') as $path) {
            if (!is_dir($path)) {
                continue;
            }

            if (is_readable($path . '/composer.json')) {
                $file_json   = json_decode(file_get_contents($path . '/composer.json'));
                $plugin_desc = $file_json->description ?: 'N/A';
            }
            else {
                $plugin_desc = 'N/A';
            }

            $name      = substr($path, strlen($plugin_dir));
            $plugins[] = array(
                'name'    => $name,
                'desc'    => $plugin_desc,
                'enabled' => in_array($name, (array) $this->config['plugins'])
            );
        }

        return $plugins;
    }
483013
public function getPlugin() {
	
		$folder = $this->getBaseFolder() . '/' . strtolower(str_replace(array(' ', '_'), '', $this->name));
		$dateReleased = $this->dateReleased->format('Y-m-d');
		
		// special parameters for Template plugin
		$options = [
			'derived' => (string)\intval($this->derived),
			'palette' => implode(',', $this->palette)
		];
		
		$plugin = new Plugin('Template', $this->name, $this->version, $dateReleased, $this->appVersion, $folder, $options);
	
		return $plugin;
	
	}
851352
public function generate()
    {
        // Get the navigation pages from the config
        $pages = Config::get('decoy.site.nav');
        if (is_callable($pages)) {
            $pages = call_user_func($pages);
        }

        // Loop through the list of pages and massage
        $massaged = [];
        foreach ($pages as $key => $val) {

            // If val is an array, make a drop down menu
            if (is_array($val)) {

                // Create a new page instance that represents the dropdown menu
                $page = ['active' => false];
                $page = array_merge($page, $this->makeIcon($key));
                $page['children'] = [];

                // Loop through children (we only support one level deep) and
                // add each as a child
                foreach ($val as $child_key => $child_val) {
                    $page['children'][] = $this->makePage($child_key, $child_val);
                }

                // See if any of the children are active and set the pulldown to active
                foreach ($page['children'] as $child) {
                    if (!empty($child->active)) {
                        $page['active'] = true;
                        break;
                    }
                }

                // Add the pulldown to the list of pages
                $massaged[] = (object) $page;

            // The page is a simple (non pulldown) link
            } else {
                $massaged[] = $this->makePage($key, $val);
            }
        }

        // Pass along the navigation data
        return $massaged;
    }
186948
public function getPluginsList()
    {
        return [
            'Autoemail' => [
                'info' => 'This plugin converts plain-text emails into clickable <code>mailto:</code> links.',
                'groups' => [
                    ForumEnv::get('FEATHER_ADMIN'),
                    ForumEnv::get('FEATHER_MOD'),
                    ForumEnv::get('FEATHER_MEMBER')
                ]
            ],

            'Autoimage' => [
                'info' => 'This plugin converts plain-text image URLs into actual images. Only URLs starting with '.
                    '<code>http://</code> or <code>https://</code> and ending with <code>.gif</code>, '.
                    '<code>.jpeg</code>, <code>.jpg</code> or <code>.png</code> are converted.',
                'groups' => [
                    ForumEnv::get('FEATHER_ADMIN'),
                    ForumEnv::get('FEATHER_MOD'),
                    ForumEnv::get('FEATHER_MEMBER')
                ]
            ],

            'Autolink' => [
                'info' => 'This plugin converts plain-text URLs into clickable links. Only URLs starting with '.
                    'a scheme (e.g. "http://") are converted. Note that by default, the only allowed schemes '.
                    'are <code>http</code> and <code>https</code>.',
                'groups' => [
                    ForumEnv::get('FEATHER_ADMIN'),
                    ForumEnv::get('FEATHER_MOD'),
                    ForumEnv::get('FEATHER_MEMBER')
                ]
            ],

            'Autovideo' => [
                'info' => 'This plugin converts plain-text video URLs into playable videos. Only URLs starting '.
                    'with <code>http://</code> or <code>https://</code> and ending with <code>.mp4</code>, '.
                    '<code>.ogg</code> or <code>.webm</code> are converted.',
                'groups' => [
                    ForumEnv::get('FEATHER_ADMIN'),
                    ForumEnv::get('FEATHER_MOD'),
                    ForumEnv::get('FEATHER_MEMBER')
                ]
            ],

            'BBCodes' => [
                'info' => 'This plugin handles a very flexible flavour of the <code>BBCode</code> syntax.',
                'groups' => []
            ],

            'Censor' => [
                'info' => 'This plugin censors text based on a configurable list of words',
                'groups' => [
                    ForumEnv::get('FEATHER_GUEST'),
                    ForumEnv::get('FEATHER_MEMBER')
                ]
            ],

            'Emoji' => [
                'info' => 'Emoji are a standardized set of pictographs. They exists as Unicode characters '.
                    'and ASCII shortcodes.',
                'groups' => []
            ],

            'Emoticons' => [
                'info' => 'This plugin performs simple replacements, best suited for handling emoticons. '.
                    'Matching is case-sensitive.',
                'groups' => [
                    ForumEnv::get('FEATHER_ADMIN'),
                    ForumEnv::get('FEATHER_MOD'),
                    ForumEnv::get('FEATHER_GUEST'),
                    ForumEnv::get('FEATHER_MEMBER')
                ]
            ],

            'Escaper' => [
                'info' => 'This plugin defines the backslash character <code>\</code> as an escape character.',
                'groups' => [
                    ForumEnv::get('FEATHER_ADMIN'),
                    ForumEnv::get('FEATHER_MOD'),
                    ForumEnv::get('FEATHER_MEMBER')
                ]
            ],

            'FancyPants' => [
                'info' => 'This plugin provides enhanced typography, aka "fancy Unicode symbols." '.
                    'It is inspired by <a href="http://daringfireball.net/projects/smartypants/">SmartyPants</a> and '.
                    '<a href="http://redcloth.org/textile/writing-paragraph-text/#typographers-quotes">'.
                    'RedCloth\'s Textile</a>.',
                'groups' => [
                    ForumEnv::get('FEATHER_ADMIN'),
                    ForumEnv::get('FEATHER_MOD'),
                    ForumEnv::get('FEATHER_MEMBER')
                ]
            ],

            'HTMLComments' => [
                'info' => 'This plugins allows HTML comments to be used. Internet Explorer\'s conditional '.
                    'comments are explicitly disabled because they could pose a security risk as they could be used '.
                    'to bypass the built-in template security.<br />The characters <code><</code> or <code>></code> '.
                    'are removed from the comments\' contents, as well as the illegal sequence <code>--</code>.',
                'groups' => [
                    ForumEnv::get('FEATHER_ADMIN')
                ]
            ],

            'HTMLElements' => [
                'info' => 'This plugin enables a whitelist of HTML elements to be used. By default, no HTML '.
                    'elements and no attributes are allowed. For each HTML element, a whitelist of attributes can '.
                    'be set. Unsafe elements such as <code><b><</b>script<b>></b></code> and unsafe attributes '.
                    'such as <code>onclick</code> must be set using a different method that safe elements and '.
                    'attributes.',
                'groups' => [
                    ForumEnv::get('FEATHER_ADMIN')
                ]
            ],

            'HTMLEntities' => [
                'info' => 'By default, s9e\TextFormatter escapes HTML entities. This plugins allows HTML '.
                    'entities to be used.<br>Note: while numeric entities such as <code>& #160;</code> are always '.
                    'available, the list of named entities such as <code>& hearts;</code> depends on PHP\'s '.
                    'internal table.',
                'groups' => [
                    ForumEnv::get('FEATHER_ADMIN')
                ]
            ],

            'Keywords' => [
                'info' => 'This plugin serves to capture keywords in plain text and render them as a rich '.
                    'element of your choosing such as a link, a popup or a widget.',
                'groups' => [
                    ForumEnv::get('FEATHER_ADMIN'),
                    ForumEnv::get('FEATHER_MOD')
                ]
            ],

            'Litedown' => [
                'info' => 'This plugin implements a Markdown-like syntax, inspired by modern flavors of Markdown.<br>'.
                    'A more detailed description of the syntax in available in <a href="http://s9etextformatter.'.
                    'readthedocs.io/Plugins/Litedown/Syntax/">Syntax</a>.',
                'groups' => [
                    ForumEnv::get('FEATHER_ADMIN'),
                    ForumEnv::get('FEATHER_MOD'),
                    ForumEnv::get('FEATHER_GUEST'),
                    ForumEnv::get('FEATHER_MEMBER')
                ]
            ],

            'MediaEmbed' => [
                'info' => 'This plugin allows the user to embed content from allowed sites using a '.
                    '<code>[media]</code> BBCode, site-specific BBCodes such as <code>[youtube]</code>, or from '.
                    'simply posting a supported URL in plain text.',
                'groups' => [
                    ForumEnv::get('FEATHER_ADMIN'),
                    ForumEnv::get('FEATHER_MOD'),
                    ForumEnv::get('FEATHER_MEMBER')
                ]
            ],

            'PipeTables' => [
                'info' => 'This plugin implements a type of ASCII-style tables inspired by '.
                    'GitHub-flavored Markdown, Pandoc\'s pipe tables and PHP Markdown Extra\'s simple tables.'.
                    'See its <a href="http://s9etextformatter.readthedocs.io/Plugins/PipeTables/Syntax/">Syntax</a>.',
                'groups' => [
                    ForumEnv::get('FEATHER_ADMIN'),
                    ForumEnv::get('FEATHER_MOD'),
                    ForumEnv::get('FEATHER_GUEST'),
                    ForumEnv::get('FEATHER_MEMBER')
                ]
            ],

            'Preg' => [
                'info' => 'This plugin performs generic, regexp-based replacements. The values in the named '.
                    'capturing subpatterns in the matching regexp are available as attributes in the XSL replacement.',
                'groups' => []
            ]
        ];
    }
179146
public function index()
    {
        $this->requireAdmin();

        $json = $this->getComposerJson();
        $this->view->installedPackages = $json['require'];

        $pluginInfo = new PluginInformationCollection();
        $pluginInfo->add(FilesPluginInformation::newFromDir(
            PHPCI_DIR . "PHPCI/Plugin/"
        ));
        $pluginInfo->add(ComposerPluginInformation::buildFromYaml(
            PHPCI_DIR . "vendor/composer/installed.json"
        ));

        $this->view->plugins = $pluginInfo->getInstalledPlugins();

        $this->layout->title = Lang::get('plugins');

        return $this->view->render();
    }
734491
private function create_page()
    {
        $self = $this;
        $page = new \Amarkal\Extensions\WordPress\Admin\AdminPage(array(
            'title'         => $this->config->sidebar_title,
            'icon'          => $this->config->sidebar_icon,
            'class'         => $this->config->sidebar_icon_class,
            'style'         => $this->config->sidebar_icon_style
        ));
        foreach( $this->config->sections as $section )
        {
            $page->add_page(array(
                'title'         => $section->title,
                'capability'    => 'manage_options',
                'content'       => function() use ( $self ) { $self->render(); }
            ));
        }
        return $page;
    }
472229
public static function get_page_templates() {
		static $wrappers = [];
		if ( $wrappers ) {
			return $wrappers;
		}

		$page_templates = new Model\Page_Templates();
		$wrappers = $page_templates->get();
		return $wrappers;
	}
502325
public function generateLinks() {
        return '<' . $this->generateUrl($this->getNextPageQueryCriteria()) . '>; rel="next",'
        . '<' . $this->generateUrl($this->getLastPageQueryCriteria()) . '>; rel="last",'
        . '<' . $this->generateUrl($this->getFirstPageQueryCriteria()) . '>; rel="first",'
        . '<' . $this->generateUrl($this->getPreviousPageQueryCriteria()) . '>; rel="prev"';
    }
1296030
private function generatePageTemplateConfiguration()
    {
        $this->copyTemplates();
        $this->installDefaultPagePartConfiguration($this->bundle);
        $this->copyTemplateConfig();
        $this->assistant->writeLine('Generating template configuration : <info>OK</info>');
    }
910960
public function getInternalPlugins()
    {
        // Return only plugins with no custom url
        $plugins = [];
        foreach ($this->getPlugins() as $name => $url) {
            if (empty($url)) {
                $plugins[] = $name;
            }
        }
        return $plugins;
    }
416402
public function generate()
	{
		if (TL_MODE == 'FE' && !BE_USER_LOGGED_IN && ($this->invisible || ($this->start > 0 && $this->start > time()) || ($this->stop > 0 && $this->stop < time())))
		{
			return '';
		}

		if ($this->arrData['space'][0] != '')
		{
			$this->arrStyle[] = 'margin-top:'.$this->arrData['space'][0].'px;';
		}

		if ($this->arrData['space'][1] != '')
		{
			$this->arrStyle[] = 'margin-bottom:'.$this->arrData['space'][1].'px;';
		}

		$this->Template = new \FrontendTemplate($this->strTemplate);
		$this->Template->setData($this->arrData);

		$this->compile();

		$this->Template->style = !empty($this->arrStyle) ? implode(' ', $this->arrStyle) : '';
		$this->Template->class = trim('ce_' . $this->type . ' ' . $this->cssID[1]);
		$this->Template->cssID = ($this->cssID[0] != '') ? ' id="' . $this->cssID[0] . '"' : '';

		$this->Template->inColumn = $this->strColumn;

		if ($this->Template->headline == '')
		{
			$this->Template->headline = $this->headline;
		}

		if ($this->Template->hl == '')
		{
			$this->Template->hl = $this->hl;
		}

		return $this->Template->parse();
	}
678376
public function generate()
    {
        // create new sitemap object
        $sitemap = app('sitemap');

        // set cache (key (string), duration in minutes (Carbon|Datetime|int), turn on/off (boolean))
        // by default cache is disabled
        if (config('typicms.cache')) {
            $sitemap->setCache('laravel.sitemap', 3600);
        }

        // check if there is cached sitemap and build new only if is not
        if (!$sitemap->isCached()) {
            foreach (TypiCMS::enabledLocales() as $locale) {
                app()->setLocale($locale);

                $pages = Pages::allBy('private', 0);

                foreach ($pages as $page) {
                    $url = url($page->uri($locale));
                    $sitemap->add($url, $page->updated_at);

                    if (!$module = ucfirst($page->module)) {
                        continue;
                    }

                    if (!class_exists($module)) {
                        continue;
                    }

                    foreach ($module::all() as $item) {
                        $url = url($item->uri($locale));
                        $sitemap->add($url, $item->updated_at);
                    }
                }
            }
        }

        // show your sitemap (options: 'xml' (default), 'html', 'txt', 'ror-rss', 'ror-rdf')
        return $sitemap->render('xml');
    }