Пример #1
0
 public function init()
 {
     parent::init();
     if ($this->pageId) {
         if ($this->addFieldId) {
             $this->_field = PageFieldRecord::findOne(['page_id' => $this->pageId, 'additional_field_id' => $this->addFieldId]);
         } else {
             throw new InvalidParamException(Yii::t('front', 'No required parameter given') . ' - addFieldId');
         }
     } else {
         throw new InvalidParamException(Yii::t('front', 'No required parameter given') . ' - pageId');
     }
 }