示例#1
0
 public static function add(AbstractAsset $asset, $depends = '')
 {
     if ($depends) {
         $asset->addParent(self::find($depends));
     }
     return self::$items[] = $asset;
 }
示例#2
0
 /**
  * Constructor.
  *
  * @param string $url
  * @param string $path
  * @param array  $options
  */
 public function __construct($url, $path, $options = array())
 {
     parent::__construct($options);
     $this->type = 'File';
     $this->url = $url;
     $this->path = $path;
 }
示例#3
0
 /**
  * Constructor.
  *
  * @param string $string
  * @param array  $options
  */
 public function __construct($string, $options = array())
 {
     parent::__construct($options);
     $this->type = 'String';
     $this->string = $string;
 }
示例#4
0
 function __construct($path, array $options = array())
 {
     parent::__construct($path, $options);
     $options = array_merge($this->defaults, $options);
     $this->media = $options['media'];
 }
示例#5
0
 function __construct($path, array $options = array())
 {
     parent::__construct($path, $options);
 }
示例#6
0
 /**
  * {@inheritdoc}
  */
 public function get_defaults()
 {
     return parent::get_defaults() + array('media' => 'all');
 }
示例#7
0
 public function init()
 {
     $this->sourcePath = '@liuxy/themes/frontend/' . \Yii::$app->getView()->theme->template;
     parent::init();
     // TODO: Change the autogenerated stub
 }
 /**
  * {@inheritdoc}
  */
 public function unserialize($serialized)
 {
     list($this->filters, $parentSerialized) = unserialize($serialized);
     parent::unserialize($parentSerialized);
 }
示例#9
0
 /**
  * {@inheritdoc}
  */
 public function get_defaults()
 {
     return parent::get_defaults() + array('localize' => false, 'footer' => false);
 }
 /**
  * {@inheritdoc}
  */
 public function unserialize($serialized)
 {
     list($this->cdn, $this->moduleName, $this->dependencies, $this->exports, $this->init, $this->jqueryPlugins, $parentSerialized) = unserialize($serialized);
     parent::unserialize($parentSerialized);
 }