protected function _initByParams($params) { parent::_initByParams($params); if ($this->_movieFile->mainParams) { $attrs = $this->_movieFile->mainParams->getAttributes(); $this->setAttributes($attrs); } }
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(); } }
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)); }