private function renderComponent($componentName, $section) { if (is_readable($filePath = $this->getComponentPath($componentName))) { $plugin = null; if (($pluginName = dirname($componentName)) !== '.') { $pluginsMediator = $this->app['plugins']; $plugin = $pluginsMediator->getPlugin(getPluginClassname($pluginName)); } return $this->render($filePath, $this->getUri('../' . $componentName . '/'), $section, $plugin); } }
function getPluginList(array $except = []) { $plugins = []; if (is_dir(_PLUGINS_) && ($handle = opendir(_PLUGINS_))) { while (false !== ($entry = readdir($handle))) { if (strlen($entry) > 1 && $entry[0] !== '.' && $entry[0] !== '_' && is_dir(_PLUGINS_ . $entry) && !in_array($entry, $except)) { $plugins[] = getPluginClassname($entry); } } closedir($handle); } return $plugins; }