Esempio n. 1
0
 public function registerNode($nodeName, $nodeClass, $actions = null)
 {
     $this->atk->registerNode(static::$module . '.' . $nodeName, $nodeClass, $actions);
 }
Esempio n. 2
0
 /**
  * Get the configuration values for a section and if the section
  * turns out to be a module, try to get the module configs
  * and merge them as fallbacks.
  *
  * @param string $section Name of the section to get configs for
  *
  * @return array Configuration values
  */
 public static function getConfigForSection($section)
 {
     $config = self::getConfigValues(self::getGlobal('application_config_dir') . $section . '.php');
     $app = Atk::getInstance();
     if ($app->isModule($section)) {
         $dir = $app->moduleDir($section) . self::getGlobal('configdirname') . '/';
         if (is_dir($dir)) {
             $module_configs = self::getConfigValues($dir . $section . '.php');
             $config = array_merge($module_configs, $config);
         }
     }
     return $config;
 }