public function setup() { require_once dirname(__FILE__) . '/../config/opSecurityConfigHandler.class.php'; $DS = DIRECTORY_SEPARATOR; $OpenPNE2Path = sfConfig::get('sf_lib_dir') . $DS . 'vendor' . $DS; // ##PROJECT_LIB_DIR##/vendor/ set_include_path($OpenPNE2Path . PATH_SEPARATOR . get_include_path()); $result = parent::setup(); if (0 !== strpos(sfConfig::get('sf_task_name'), 'sfDoctrineBuild')) { $configCache = $this->getConfigCache(); $file = $configCache->checkConfig('data/config/plugin.yml', true); if ($file) { include $file; } require_once dirname(__FILE__) . '/../plugin/opPluginManager.class.php'; $pluginActivations = opPluginManager::getPluginActivationList(); $pluginActivations = array_merge(array_fill_keys($this->getPlugins(), true), $pluginActivations); foreach ($pluginActivations as $key => $value) { if (!in_array($key, $this->getPlugins())) { unset($pluginActivations[$key]); } } $pluginActivations = $this->filterSkinPlugins($pluginActivations); $this->enablePlugins(array_keys($pluginActivations, true)); $this->disablePlugins(array_keys($pluginActivations, false)); unset($this->cache['getPluginPaths']); // it should be rewrited $this->plugins = array_unique($this->plugins); } return $result; }
public function setup() { require_once dirname(__FILE__) . '/../config/opSecurityConfigHandler.class.php'; $DS = DIRECTORY_SEPARATOR; $OpenPNE2Path = sfConfig::get('sf_lib_dir') . $DS . 'vendor' . $DS; // ##PROJECT_LIB_DIR##/vendor/ set_include_path($OpenPNE2Path . PATH_SEPARATOR . get_include_path()); $result = parent::setup(); $configCache = $this->getConfigCache(); $file = $configCache->checkConfig('data/config/plugin.yml', true); if ($file) { include $file; } require_once dirname(__FILE__) . '/../plugin/opPluginManager.class.php'; $pluginActivations = opPluginManager::getPluginActivationList(); $pluginActivations = array_merge(array_fill_keys($this->getPlugins(), true), $pluginActivations); foreach ($pluginActivations as $key => $value) { if (!in_array($key, $this->getPlugins())) { unset($pluginActivations[$key]); } } $pluginActivations = $this->filterSkinPlugins($pluginActivations); $this->enablePlugins(array_keys($pluginActivations, true)); $this->disablePlugins(array_keys($pluginActivations, false)); unset($this->cache['getPluginPaths']); // it should be rewrited $this->plugins = array_unique($this->plugins); // gadget include $this->getConfigCache()->checkConfig('config/gadget_layout_config.yml'); include $this->getConfigCache()->checkConfig('config/gadget_config.yml'); require_once sfConfig::get('sf_lib_dir') . '/config/opGadgetConfigHandler.class.php'; $gadgetConfigs = sfConfig::get('op_gadget_config', array()); foreach ($gadgetConfigs as $key => $config) { $filename = 'config/' . sfInflector::underscore($key); $params = array(); if ($key != 'gadget') { $filename .= '_gadget'; $params['prefix'] = sfInflector::underscore($key) . '_'; } $filename .= '.yml'; $this->getConfigCache()->registerConfigHandler($filename, 'opGadgetConfigHandler', $params); include $this->getConfigCache()->checkConfig($filename); } return $result; }
public function setup() { parent::setup(); $this->enablePlugins('sfI18NPlugin'); }
public function setup() { parent::setup(); $this->enablePlugins('apostrophePlugin'); $this->enablePlugins('apostropheBlogPlugin'); }
public function setup() { parent::setup(); $this->enablePlugins('sfAdminDashPlugin'); }