/** * remove attribute from current row */ public function _removeAttribute($pn_attribute_id, $po_trans = null, $pa_options = null) { $t_attr = new ca_attributes($pn_attribute_id); $t_attr->purify($this->purify()); if ($po_trans) { $t_attr->setTransaction($po_trans); } if (!$t_attr->getPrimaryKey() || $t_attr->get('table_num') != $this->tableNum() || $this->getPrimaryKey() != $t_attr->get('row_id')) { $this->postError(1969, _t('Can\'t edit invalid attribute'), 'BaseModelWithAttributes->editAttribute()', $pa_options['error_source']); return false; } if (!$t_attr->removeAttribute()) { foreach ($t_attr->errors as $o_error) { $this->postError($o_error->getErrorNumber(), $o_error->getErrorDescription(), $o_error->getErrorContext(), $pa_options['error_source']); } return false; } //$this->setFieldValuesArray($this->addAttributesToFieldValuesArray()); return true; }