Get the list of selected (enabled) plugin instances.

@return \Concrete\Core\Editor\Plugin[]
764014
public function getSelectedPluginObjects()
    {
        $selected = [];
        $plugins = $this->getSelectedPlugins();
        foreach ($plugins as $key) {
            $selected[] = $this->plugins[$key];
        }

        return $selected;
    }
1068617
public static function all()
    {
        $plugins = Grav::instance()['plugins'];
        $list = [];

        foreach ($plugins as $instance) {
            $name = $instance->name;
            $result = self::get($name);

            if ($result) {
                $list[$name] = $result;
            }
        }

        return $list;
    }
869374
public function get_options() {
        if (empty($this->type)) {
            return array();
        }

        $params = array();

        if (!empty($this->plugin)) {
            $params['plugin'] = $this->plugin;
        }

        if (!empty($this->courseid)) {
            $params['id'] = $this->courseid;
        }

        if (!empty($this->userid)) {
            $params['userid'] = $this->userid;
        }

        if (!empty($this->groupid)) {
            $params['group'] = $this->groupid;
        }

        if (!empty($this->page)) {
            $params['page'] = $this->page;
        }

        return $params;
    }
349043
public function getEnabledComponents()
    {
        // Create Components List:
        
        $components = ArrayList::create();
        
        // Merge Template Components:
        
        if ($template = $this->getPageTemplate()) {
            $components->merge($template->getEnabledComponents());
        }
        
        // Merge Layout Components:
        
        if ($layout = $this->getPageLayout()) {
            $components->merge($layout->getEnabledComponents());
        }
        
        // Answer Components List:
        
        return $components;
    }
1181897
protected function get_list_of_themes() {
        $selectablethemes = array();

        // Get all themes installed on site.
        $themes = core_component::get_plugin_list('theme');
        ksort($themes);

        foreach ($themes as $themename => $themedir) {
            // Load the theme config.
            try {
                $theme = $this->get_theme_config($themename);
            } catch (Exception $e) {
                // Bad theme, just skip it for now.
                continue;
            }
            if ($themename !== $theme->name) {
                // Obsoleted or broken theme, just skip for now.
                continue;
            }
            if ($theme->hidefromselector) {
                // The theme doesn't want to be shown in the theme selector and as theme
                // designer mode is switched off we will respect that decision.
                continue;
            }
            $selectablethemes[] = $themename;
        }

        return $selectablethemes;
    }
980563
public static function get_enabled_plugins() {
        global $CFG;

        $order = (!empty($CFG->converter_plugins_sortorder)) ? explode(',', $CFG->converter_plugins_sortorder) : [];
        if ($order) {
            $plugins = \core_plugin_manager::instance()->get_installed_plugins('fileconverter');
            $order = array_intersect($order, array_keys($plugins));
        }

        return array_combine($order, $order);
    }
539338
public function plugins()
    {
        // plugins is a list of arrays, activate on a per plugin base
        if (is_array($this->plugins)) {
            return $this->plugins;
        }

        // for anything the evaluates to true, activate all plugins
        if ($this->plugins) {
            $plugins = apply_filters('all_plugins', get_plugins());

            return array_keys($plugins);
        }

        return [];
    }
469751
public function getSelectableFields() {

		// Instantiate some default selectable fields, just in case the search engine does not provide any.

		$selectable = array(
			'LastEdited' => _t('EXTENSIBLE_SEARCH.LAST_EDITED', 'Last Edited'),
			'ID' => _t('EXTENSIBLE_SEARCH.CREATED', 'Created'),
			'ClassName' => _t('EXTENSIBLE_SEARCH.TYPE', 'Type')
		);

		// Determine the search engine that has been selected.

		if(($this->SearchEngine !== 'Full-Text') && ClassInfo::exists($this->SearchEngine)) {

			// Determine the search engine specific selectable fields.

			$fields = singleton($this->SearchEngine)->getSelectableFields($this) ?: array();
			return $fields + $selectable;
		}
		else if(($this->SearchEngine === 'Full-Text') && is_array($classes = Config::inst()->get(FulltextSearchable::class, 'searchable_classes')) && (count($classes) > 0)) {

			// Determine the full-text specific selectable fields.

			$selectable = array(
				'Relevance' => _t('EXTENSIBLE_SEARCH.RELEVANCE', 'Relevance')
			) + $selectable;
			foreach($classes as $class) {
				$fields = DataObject::getSchema()->databaseFields($class);

				// Determine the most appropriate fields, primarily for sorting.

				if(isset($fields['Title'])) {
					$selectable['Title'] = _t('EXTENSIBLE_SEARCH.TITLE', 'Title');
				}
				if(isset($fields['MenuTitle'])) {
					$selectable['MenuTitle'] = _t('EXTENSIBLE_SEARCH.NAVIGATION_TITLE', 'Navigation Title');
				}
				if(isset($fields['Sort'])) {
					$selectable['Sort'] = _t('EXTENSIBLE_SEARCH.DISPLAY_ORDER', 'Display Order');
				}

				// This is specific to file searching.

				if(isset($fields['Name'])) {
					$selectable['Name'] = _t('EXTENSIBLE_SEARCH.FILE_NAME', 'File Name');
				}
			}
		}

		// Allow extension customisation, so custom fields may be selectable.

		$this->extend('updateExtensibleSearchPageSelectableFields', $selectable);
		return $selectable;
	}
1275707
public function getActionPlugins()
    {
        if (null === $this->actionPlugins) {
            $this->setActionPlugins(new Action\PluginManager());
        }
        return $this->actionPlugins;
    }
78535
public function scriptsAll(): array
    {
        $scripts = [];
        foreach ($this->getAll() as $name => $plugin) {
            $scripts[$name] = $plugin->scripts();
        }
        return $scripts;
    }
872697
protected function getPluginFields()
    {
        return array(
            'debug' => array(
                'type' => 'radio',
                'label' => $this->t('field_debug'),
                'description' => $this->t('desc_debug'),
                'options' => array(
                    PluginConfig::Send_SendAndMailOnError => $this->t('option_debug_1'),
                    PluginConfig::Send_SendAndMail => $this->t('option_debug_2'),
                    PluginConfig::Send_TestMode => $this->t('option_debug_3'),
                ),
                'attributes' => array(
                    'required' => true,
                ),
            ),
            'logLevel' => array(
                'type' => 'radio',
                'label' => $this->t('field_logLevel'),
                'description' => $this->t('desc_logLevel'),
                'options' => array(
                    Log::Notice => $this->t('option_logLevel_3'),
                    Log::Info => $this->t('option_logLevel_4'),
                    Log::Debug => $this->t('option_logLevel_5'),
                ),
                'attributes' => array(
                    'required' => true,
                ),
            ),
        );
    }
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;
    }
132931
public static function get_observer_list() {
        $events = \core\event\manager::get_all_observers();
        foreach ($events as $key => $observers) {
            foreach ($observers as $observerskey => $observer) {
                $events[$key][$observerskey]->parentplugin =
                        \core_plugin_manager::instance()->get_parent_of_subplugin($observer->plugintype);
            }
        }
        return $events;
    }
44627
protected function get_contrib_list() {
        return array_map(function($plugins) {
            return array_filter($plugins, function($plugindata) {
                return !$plugindata->is_standard();
            });
        }, \core_plugin_manager::instance()->get_plugins());
    }
806914
public function getPluginNames() {
    $definitions = $this->getDefinitions();
    $plugin_names = [];

    foreach ($definitions as $definition) {
      $name = $definition['name']->getUntranslatedString();
      $plugin_names[$definition['id']] = $name;
    }

    return $plugin_names;
  }
602527
public function get_installed_plugins($type) {
        $this->load_installed_plugins();
        if (isset($this->installedplugins[$type])) {
            return $this->installedplugins[$type];
        }
        return array();
    }
685429
protected function getActivePlugins(): array
    {
        if ($this->activePlugins) {
            return $this->activePlugins;
        }

        $this->activePlugins = (array) get_option('active_mu_plugins', []);

        return $this->activePlugins;
    }