示例#1
0
 public function updateNotice()
 {
     $moduleName = \common\populac\components\Module::getModuleName(get_class($this->owner));
     if ($module = Module::findOne(['name' => $moduleName])) {
         $module->notice = call_user_func($this->callback);
         $module->update();
     }
 }
示例#2
0
文件: API.php 项目: tqsq2005/Yii2adv
 public function init()
 {
     parent::init();
     $this->module = Module::getModuleName(self::className());
     Module::registerTranslations($this->module);
 }