Plugins list with default groups

'FEATHER_UNVERIFIED' => 0,
'FEATHER_ADMIN' => 1,
'FEATHER_MOD' => 2,
'FEATHER_GUEST' => 3,
'FEATHER_MEMBER' => 4,
@return array
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' => []
            ]
        ];
    }
534338
protected function get_enabled_plugins() {
        $plugins = \core\plugininfo\fileconverter::get_enabled_plugins();

        $pluginclasses = [];
        foreach ($plugins as $plugin) {
            $pluginclasses[$plugin] = \core\plugininfo\fileconverter::get_classname($plugin);
        }

        return $pluginclasses;
    }
274409
public function getUserGroups()
    {
        $groups = [];
        foreach ($this->adminGroupConfiguration->getGroups() as $groupName) {
            $groups[] = $this->getUserGroup("$groupName");
        }
        $groups[] = $this->getUserGroup('guest');

        return $groups;
    }
745198
protected function getDefaults() {
        if (!$this->_defaults) {
            $this->_defaults = new DefaultsList($this->version, $this->solution['sid']);
        }

        return $this->_defaults;
    }
739675
public function getIgnores()
    {
        $configFile = $this->directory.'/.moodle-plugin-ci.yml';

        if (!is_file($configFile)) {
            return [];
        }

        $config = Yaml::parse(file_get_contents($configFile));

        // Search for context (AKA command) specific filter first.
        if (!empty($this->context) && array_key_exists('filter-'.$this->context, $config)) {
            return $config['filter-'.$this->context];
        }

        return array_key_exists('filter', $config) ? $config['filter'] : [];
    }
26934
private function Groups()
    {
        if ($this->groups === null)
        {
            $this->groups = array();
            if ($this->GetMember())
            {
                $this->groups = MembergroupUtil::MemberMembergroups($this->GetMember());
            }
        }
        return $this->groups;
    }
735491
public static function get_enabled_plugins() {
        global $CFG;

        if (empty($CFG->antiviruses)) {
            return array();
        }

        $enabled = array();
        foreach (explode(',', $CFG->antiviruses) as $antivirus) {
            $enabled[$antivirus] = $antivirus;
        }

        return $enabled;
    }
133468
private function get_defaults() {
    $defaults = array(
      'oauth_version'          => $this->config['oauth_version'],
      'oauth_nonce'            => $this->config['nonce'],
      'oauth_timestamp'        => $this->config['timestamp'],
      'oauth_consumer_key'     => $this->config['consumer_key'],
      'oauth_signature_method' => $this->config['oauth_signature_method'],
    );

    // include the user token if it exists
    if ( $this->config['user_token'] )
      $defaults['oauth_token'] = $this->config['user_token'];

    // safely encode
    foreach ($defaults as $k => $v) {
      $_defaults[$this->safe_encode($k)] = $this->safe_encode($v);
    }

    return $_defaults;
  }
845767
public static function get_plugin_types_with_subplugins() {
        self::init();

        $return = array();
        foreach (self::$supportsubplugins as $type) {
            $return[$type] = self::$plugintypes[$type];
        }
        return $return;
    }
247930
public function getGroups()
    {
        $groups = [];

        foreach ($this->rootlineElements as $rootlineElement) {
            $rootlineElementGroups = $rootlineElement->getGroups();
            $groups = array_merge($groups, $rootlineElementGroups);
        }

        $groups = $this->cleanGroupArray($groups);

        return $groups;
    }
121180
private static function get_network_plugins() {
            self::require_plugin_essentials();

            $all_plugins = fs_get_plugins();

            $network_active_basenames = is_multisite() ?
                get_site_option( 'active_sitewide_plugins' ) :
                array();

            foreach ( $all_plugins as $basename => &$data ) {
                // By default set to inactive (next foreach update the active plugins).
                $data['is_active'] = false;
                // Enrich with plugin slug.
                $data['slug'] = self::get_plugin_slug( $basename );
            }

            // Flag active plugins.
            foreach ( $network_active_basenames as $basename ) {
                if ( isset( $all_plugins[ $basename ] ) ) {
                    $all_plugins[ $basename ]['is_active'] = true;
                }
            }

            return $all_plugins;
        }
212511
public function getDefaultHeaders()
    {
        return [
            'User-Agent' => 'plivo-php/' . implode('.',
                    [Version::MAJOR, Version::MINOR, Version::PATCH])
                    . ' (PHP ' . $this->phpVersion . ')',
            'Accept-Encoding' => '*',
            'Content-type' => 'application/json'
        ];
    }
1288888
public function getDefaults()
    {
        return [
            'activation_token_expire' => self::SECONDS_ACTIVATION_TOKEN_EXPIRE,
            'allow_polls' => self::FLAG_ALLOW_POLLS,
            'email_token_expire' => self::SECONDS_EMAIL_TOKEN_EXPIRE,
            'from_email' => self::DEFAULT_FROM_EMAIL,
            'from_name' => self::DEFAULT_FROM_NAME,
            'hot_minimum' => self::HOT_MINIMUM,
            'maintenance_mode' => self::MAINTENANCE_MODE,
            'max_attempts' => self::MAX_SEND_ATTEMPTS,
            'members_visible' => self::FLAG_MEMBERS_VISIBLE,
            'merge_posts' => self::FLAG_MERGE_POSTS,
            'meta_description' => self::META_DESCRIPTION,
            'meta_keywords' => self::META_KEYWORDS,
            'name' => self::PODIUM_NAME,
            'password_reset_token_expire' => self::SECONDS_PASSWORD_RESET_TOKEN_EXPIRE,
            'recaptcha_secretkey' => '',
            'recaptcha_sitekey' => '',
            'registration_off' => self::REGISTRATION_OFF,
            'use_captcha' => self::FLAG_USE_CAPTCHA,
            'use_wysiwyg' => self::FLAG_USE_WYSIWYG,
            'version' => Podium::getInstance()->version,
        ];
    }
726837
protected function getGroups()
	{
		// Initialize variables.
		$groups = array();

		// Initialize some field attributes.
		$menuType  = (string) $this->element['menu_type'];
		$published = $this->element['published'] ? explode(',', (string) $this->element['published']) : array();
		$disable   = $this->element['disable'] ? explode(',', (string) $this->element['disable']) : array();
		$language  = $this->element['language'] ? explode(',', (string) $this->element['language']) : array();

		// Get the menu items.
		$items = array();
		if (file_exists(PATH_CORE . '/components/com_menus/helpers/menus.php'))
		{
			// Import the com_menus helper.
			require_once PATH_CORE . '/components/com_menus/helpers/menus.php';

			$items = \Components\Menus\Helpers\Menus::getMenuLinks($menuType, 0, 0, $published, $language);
		}

		// Build group for a specific menu type.
		if ($menuType)
		{
			// Initialize the group.
			$groups[$menuType] = array();

			// Build the options array.
			foreach ($items as $link)
			{
				$groups[$menuType][] = Dropdown::option($link->value, $link->text, 'value', 'text', in_array($link->type, $disable));
			}
		}
		// Build groups for all menu types.
		else
		{
			// Build the groups arrays.
			foreach ($items as $menu)
			{
				// Initialize the group.
				$groups[$menu->menutype] = array();

				// Build the options array.
				foreach ($menu->links as $link)
				{
					$groups[$menu->menutype][] = Dropdown::option(
						$link->value, $link->text, 'value', 'text',
						in_array($link->type, $disable)
					);
				}
			}
		}

		// Merge any additional groups in the XML definition.
		$groups = array_merge(parent::getGroups(), $groups);

		return $groups;
	}
1221432
public function getDefaultOptions(): array
    {
        // Setup default validation rules.
        $this->defaultOptions['rules'] = $this->rules;

        // Setup default messages.
        $this->defaultOptions['messages'] = $this->messages;

        // Setup default placeholder.
        $this->defaultOptions['placeholder'] = $this->placeholder ?? $this->getBaseName();

        // Setup default label.
        $this->defaultOptions['label'] = $this->label ?? ucfirst(str_replace(['-', '_'], ' ', $this->getBaseName()));

        return $this->defaultOptions;
    }
938463
private function allDefaults()
    {
        return [
            'wrapper' => ['class' => $this->getConfig('defaults.wrapper_class')],
            'attr' => ['class' => $this->getConfig('defaults.field_class')],
            'help_block' => ['text' => null, 'tag' => 'p', 'attr' => [
                'class' => $this->getConfig('defaults.help_block_class')
            ]],
            'value' => null,
            'default_value' => null,
            'label' => null,
            'label_show' => true,
            'is_child' => false,
            'label_attr' => ['class' => $this->getConfig('defaults.label_class')],
            'errors' => ['class' => $this->getConfig('defaults.error_class')],
            'rules' => [],
            'error_messages' => []
        ];
    }
725643
public function getInstalledPlugins()
    {
        $arr = array();

        foreach ($this->pluginInformations as $single) {
            $arr = array_merge($arr, $single->getInstalledPlugins());
        }

        return $arr;
    }