protected function createData() { $data = parent::createData(); if ($this->getState() == 'add') { $data->getFieldByName('site_id')->setData($this->getParam('siteID'), true); } return $data; }
protected function createData() { $result = parent::createData(); if ($this->getType() != self::COMPONENT_TYPE_LIST) { $f = new Field('group_div_rights'); $f->setData($this->buildDivRightsData()); $result->addField($f); } return $result; }
protected function createData() { $result = parent::createData(); $id = $this->getFilter(); $id = !empty($id) && is_array($id) ? current($id) : false; if ($this->getType() != self::COMPONENT_TYPE_LIST && $id) { //создаем переменную содержащую идентификторы групп в которые входит пользователь $f = new Field('group_id'); $result->addField($f); $data = $this->dbh->select('user_user_groups', array('group_id'), array('u_id' => $id)); if (!empty($data)) { $f->addRowData(array_keys(convertDBResult($data, 'group_id', true))); } else { $f->setData(array()); } } return $result; }