All dependent asset bundles will be registered.
public registerAssetBundle ( string $name, integer | null $position = null ) : |
||
$name | string | the class name of the asset bundle (without the leading backslash) |
$position | integer | null | if set, this forces a minimum position for javascript files. This will adjust depending assets javascript file position or fail if requirement can not be met. If this is null, asset bundles position settings will not be changed. See [[registerJsFile]] for more details on javascript position. |
Résultat | the registered asset bundle instance |
/** * Registers this asset bundle with a view. * @param View $view the view to be registered with * @return static the registered asset bundle instance */ public static function register($view) { return $view->registerAssetBundle(get_called_class()); }
/** * Registers this asset bundle with a view. * @param View $view the view to be registered with * @return static the registered asset bundle instance */ public static function registerPoint($view, $point) { return $view->registerAssetBundle(get_called_class(), $point); }
/** * @inheritdoc */ public function registerAssetBundle($name, $position = null) { $this->viewElementsGathener->gather(__FUNCTION__, func_get_args()); return parent::registerAssetBundle($name, $position); }
/** * @param View $view * @return the registered asset bundle instance */ public function registerAll($view) { $this->checkDependency(); return $view->registerAssetBundle(get_class($this)); }
/** * Registers this asset bundle with a view. * @param View $view the view to be registered with * @param array() $assets * @return static the registered asset bundle instance */ public static function register($view, $assets = []) { // https://github.com/borodulin/yii2-codemirror/issues/1 self::$_assets = \yii\helpers\ArrayHelper::merge(self::$_assets, array_flip($assets)); return $view->registerAssetBundle(get_called_class()); }