Example #1
0
 protected function _initByParams($params)
 {
     parent::_initByParams($params);
     if ($this->_movieFile->mainParams) {
         $attrs = $this->_movieFile->mainParams->getAttributes();
         $this->setAttributes($attrs);
     }
 }
Example #2
0
 protected function _initByParams($params)
 {
     parent::_initByParams($params);
     $this->items = new FormCollection();
     if ($this->_movieFile->audioParams) {
         foreach ($this->_movieFile->audioParams as $paramsItem) {
             $item = $this->createItem();
             $item->setAttributes($paramsItem->getAttributes());
             $this->items[] = $item;
         }
     } else {
         $this->items[] = $this->createItem();
     }
 }
Example #3
0
 protected function _initByParams($params)
 {
     parent::_initByParams($params);
     $movie = $params['movie'];
     $this->setAttributes(array('movieId' => $movie->id, 'type' => $this->_movieFile->type ?: Movie\File::TYPE_MAIN, 'comment' => $this->_movieFile->comment));
 }