コード例 #1
0
ファイル: sfAction.class.php プロジェクト: taryono/school
 /**
  * Initializes this action.
  *
  * @param sfContext The current application context.
  *
  * @return bool true, if initialization completes successfully, otherwise false
  */
 public function initialize($context)
 {
     parent::initialize($context);
     // include security configuration
     require sfConfigCache::getInstance()->checkConfig(sfConfig::get('sf_app_module_dir_name') . '/' . $this->getModuleName() . '/' . sfConfig::get('sf_app_module_config_dir_name') . '/security.yml', true);
     return true;
 }
コード例 #2
0
 /**
  * Initializes this action.
  *
  * @param sfContext $context    The current application context.
  * @param string    $moduleName The module name.
  * @param string    $actionName The action name.
  *
  * @return bool true, if initialization completes successfully, otherwise false
  */
 public function initialize($context, $moduleName, $actionName)
 {
     parent::initialize($context, $moduleName, $actionName);
     // include security configuration
     if ($file = $context->getConfigCache()->checkConfig('modules/' . $this->getModuleName() . '/config/security.yml', true)) {
         require $file;
     }
 }
コード例 #3
0
 /**
  * Disables on fly action cache
  *
  * @param string $moduleName
  * @param string $actionName
  * @return boolean
  */
 public function disableCache($moduleName = null, $actionName = null)
 {
     if (!sfConfig::get('sf_cache')) {
         return false;
     }
     if (!$moduleName && !$actionName) {
         $moduleName = $this->component->getModuleName();
         $actionName = $this->component->getActionName();
     }
     $this->context->getViewCacheManager()->disableCache($moduleName, $actionName);
     return true;
 }
コード例 #4
0
 public function initialize($context)
 {
     parent::initialize($context);
     if ($file = sfConfigCache::getInstance()->checkConfig(sfConfig::get('sf_app_module_dir_name') . '/' . $this->getModuleName() . '/' . sfConfig::get('sf_app_module_config_dir_name') . '/security.yml', true)) {
         require $file;
     }
     return true;
 }
コード例 #5
0
 /**
  * Loads filters configuration for a given action instance.
  *
  * @param sfComponent $actionInstance A sfComponent instance
  */
 public function loadConfiguration($actionInstance)
 {
     require sfContext::getInstance()->getConfigCache()->checkConfig('modules/' . $actionInstance->getModuleName() . '/config/filters.yml');
 }