コード例 #1
0
 public static function register($view)
 {
     if ($view instanceof \yii\base\View) {
         static::$_view = $view;
         static::$_module = static::$_view->context->module->id;
     } else {
         throw new \yii\base\NotSupportedException('invalid view object');
     }
 }
コード例 #2
0
ファイル: BaseHelper.php プロジェクト: tashik/phalcon_core
 /**
  * Init helper
  *
  * @param \Engine\Crud\Grid\Extjs|\Engine\Crud\Form\Extjs $element
  * @return string
  */
 public static function init($element)
 {
     static::$_module = \Phalcon\Text::camelize($element->getModuleName());
     static::$_prefix = \Phalcon\Text::camelize($element->getKey());
 }
コード例 #3
0
ファイル: Module.php プロジェクト: ITw3/redaxscript
 /**
  * constructor of the class
  *
  * @since 2.2.0
  *
  * @param array $module custom module setup
  */
 public function __construct($module = array())
 {
     if (is_array($module)) {
         static::$_module = array_merge(static::$_module, $module);
     }
 }