コード例 #1
0
ファイル: Redactor.php プロジェクト: karneds/yii2-redactor
 public function registerBundles()
 {
     RedactorAsset::register($this->getView());
     if (isset($this->clientOptions['lang'])) {
         RedactorRegionalAsset::register($this->getView())->language = $this->clientOptions['lang'];
     }
     if (isset($this->clientOptions['plugins']) && count($this->clientOptions['plugins'])) {
         foreach ($this->clientOptions['plugins'] as $plugin) {
             $assetBundle = 'yii\\redactor\\RedactorPlugin' . ucfirst($plugin) . 'Asset';
             if (class_exists($assetBundle)) {
                 $assetBundle::register($this->getView());
             }
         }
     }
 }
コード例 #2
0
ファイル: Redactor.php プロジェクト: dimd4/yii2-redactor
 /**
  * Register assetBundle
  */
 protected function registerAssetBundle()
 {
     $this->_assetBundle = RedactorAsset::register($this->getView());
 }