/**
  * Sets the asset
  * @param string $key
  * @param SupsysticSlider_Ui_Asset $value
  * @throws InvalidArgumentException
  * @return SupsysticSlider_Ui_AssetsCollection
  */
 public function set($key, $value)
 {
     if (!$value instanceof SupsysticSlider_Ui_Asset) {
         throw new InvalidArgumentException('Parameter 2 must be instance of SupsysticSlider_Ui_Asset.');
     }
     if ($key !== $value->getHandle()) {
         throw new InvalidArgumentException('The handle of the asset my be the same as $key value');
     }
     parent::set($key, $value);
     return $this;
 }
Exemplo n.º 2
0
 /**
  * Constructor
  * @param string $handle
  * @param string $source
  * @param bool $preventCaching
  */
 public function __construct($handle, $source = null, $preventCaching = false)
 {
     parent::__construct($handle, $source, $preventCaching);
     $this->inFooter = false;
 }
Exemplo n.º 3
0
 /**
  * Constructor
  * @param string $handle
  * @param string $source
  * @param bool $preventCaching
  */
 public function __construct($handle, $source = null, $preventCaching = false)
 {
     parent::__construct($handle, $source, $preventCaching);
     $this->media = 'all';
 }