Lines Matching refs:type

35      * Returns a list of available plugins of given type
37 * @param $type string, plugin_type name;
38 * the type of plugin to return,
45 * - plugin names when $type = ''
46 * - or plugin component names when a $type is given
50 public function getList($type = '', $all = false)
54 if (!$type) {
58 if (!isset($this->listByType[$type]['enabled'])) {
59 $this->listByType[$type]['enabled'] = $this->getListByType($type, true);
61 if ($all && !isset($this->listByType[$type]['disabled'])) {
62 $this->listByType[$type]['disabled'] = $this->getListByType($type, false);
66 ? array_merge($this->listByType[$type]['enabled'], $this->listByType[$type]['disabled'])
67 : $this->listByType[$type]['enabled'];
73 * @param $type string type of plugin to load
81 public function load($type, $name, $new = false, $disabled = false)
94 $class = $type . '_plugin_' . $name;
98 if (!empty($DOKU_PLUGINS[$type][$name])) {
99 if ($new || !$DOKU_PLUGINS[$type][$name]->isSingleton()) {
103 return $DOKU_PLUGINS[$type][$name];
130 $DOKU_PLUGINS[$type][$name] = new $class();
136 return $DOKU_PLUGINS[$type][$name];
311 foreach (['default', 'protected'] as $type) {
312 if (array_key_exists($type, $config_cascade['plugins'])) {
313 $this->pluginCascade[$type] = $this->checkRequire($config_cascade['plugins'][$type]);
331 * Returns a list of available plugin components of given type
333 * @param string $type plugin_type name; the type of plugin to return,
336 * @return array of plugin components of requested type
338 protected function getListByType($type, $enabled)
346 if (file_exists(DOKU_PLUGIN . "$plugin/$type.php")) {
350 $typedir = DOKU_PLUGIN . "$plugin/$type/";