Beispiel #1
0
 /**
  * Init module
  */
 public function init()
 {
     parent::init();
     $this->config = Config::getConfig('\\maddoger\\website\\frontend\\Module', is_array($this->config) ? $this->config : []);
     if (!isset(Yii::$app->i18n->translations['maddoger/website'])) {
         Yii::$app->i18n->translations['maddoger/website'] = ['class' => 'yii\\i18n\\PhpMessageSource', 'basePath' => '@maddoger/website/common/messages', 'sourceLanguage' => 'en-US'];
     }
 }
Beispiel #2
0
 /**
  * Init module
  */
 public function init()
 {
     parent::init();
     if (!isset(Yii::$app->i18n->translations['maddoger/elfinder'])) {
         Yii::$app->i18n->translations['maddoger/elfinder'] = ['class' => 'yii\\i18n\\PhpMessageSource', 'basePath' => '@maddoger/elfinder/messages', 'sourceLanguage' => 'en-US'];
     }
     if ($this->attributes === null) {
         $this->attributes = [['pattern' => '/\\.gitignore$/', 'read' => false, 'write' => false, 'hidden' => true, 'locked' => true], ['pattern' => '/\\.php$/', 'read' => false, 'write' => false, 'hidden' => true, 'locked' => true], ['pattern' => '#.*(\\.tmb|\\.quarantine)$#i', 'read' => false, 'write' => false, 'hidden' => true, 'locked' => true]];
     }
     if (!$this->roots) {
         $this->roots = [['driver' => 'LocalFileSystem', 'path' => Yii::getAlias('@static'), 'URL' => Yii::getAlias('@staticUrl'), 'attributes' => $this->attributes, 'accessControl' => [$this, 'accessControl'], 'accessControlData' => ['read' => ['elfinder.access'], 'write' => ['elfinder.upload']]]];
     }
     $this->clientOptions['roots'] = $this->roots;
 }
Beispiel #3
0
 /**
  * Init module
  */
 public function init()
 {
     parent::init();
     if (!isset(Yii::$app->i18n->translations['maddoger/admin'])) {
         Yii::$app->i18n->translations['maddoger/admin'] = ['class' => 'yii\\i18n\\PhpMessageSource', 'basePath' => '@maddoger/admin/messages', 'sourceLanguage' => 'en-US'];
     }
 }