getId()] = $ext; } return $extensions; } /** * Get all locally installed templates * * @return Extension[] */ public function getTemplates() { $templates = $this->readExtensionsFromDirectory(DOKU_INC . 'lib/tpl/'); ksort($templates); return $templates; } /** * Get all locally installed plugins * * Note this skips the PluginController and just iterates over the plugin dir, * it's basically the same as what the PluginController does, but allows us to * directly initialize Extension objects. * * @return Extension[] */ public function getPlugins() { $plugins = $this->readExtensionsFromDirectory(DOKU_PLUGIN); ksort($plugins); return $plugins; } /** * Get all locally installed extensions * * @return Extension[] */ public function getExtensions() { return array_merge($this->getPlugins(), $this->getTemplates()); } }