예제 #1
0
파일: Related.php 프로젝트: marvin255/bxar
 /**
  * Задает модель связанного элемента
  * @param \bxar\ActiveRecord $model
  */
 public function setRelated(\bxar\ActiveRecord $model)
 {
     $id = $model->getAttributeValue('ID');
     if ($id) {
         $this->setValue($id);
         $this->_related = $model;
     }
 }
예제 #2
0
파일: Section.php 프로젝트: marvin255/bxar
 /**
  * Возвращает список всех имен атрибутов модели
  * @return array
  */
 protected function getAttributesNames()
 {
     $return = parent::getAttributesNames();
     if (!empty($this->_initOnDemand)) {
         $return = array_merge($return, array_keys($this->_initOnDemand));
     }
     return $return;
 }