private function internalSave($runValidation, $attributeNames) { if (!parent::save($runValidation, $attributeNames)) { return false; } for ($i = 0, $cnt = count($this->temy); $i < $cnt; ++$i) { $zct = new ZanyatieChastiTemy(); $zct->zanyatie = $this->id; $zct->tema = $this->temy[$i]; $zct->chast_temy = $this->chasti_tem[$i]; if (!$zct->save()) { return false; } } return true; }