public function copy(Domain $domain) { $this->defaultValue = $domain->getDefaultValue(); $this->description = $domain->getDescription(); $this->name = $domain->getName(); $this->scale = $domain->getScale(); $this->size = $domain->getSize(); $this->sqlType = $domain->getSqlType(); $this->propelType = $domain->getType(); }
public function formObject() { $model = new Domain($this->data->id); $this->data->forUpdate = $this->data->id != ''; $this->data->object = $model->getData(); $this->data->title = $this->data->forUpdate ? $model->getDescription() : _M("New Domain"); $this->data->save = "@fnbr20/admin/domain/save/" . $model->getId() . '|formObject'; $this->data->delete = "@fnbr20/admin/domain/delete/" . $model->getId() . '|formObject'; $this->render(); }
public function update($id, Domain $domain) { $this->_access->update(StudyPressDB::getTableNameDomain(), array(StudyPressDB::COL_NAME_DOMAIN => $domain->getName(), StudyPressDB::COL_DESCRIPTION_DOMAIN => $domain->getDescription()), array(StudyPressDB::COL_ID_DOMAIN => $id)); }