/** * Method to get the record form. * * @param string $pk Private key. * * @since 2.2 * @return null */ public function getItem($pk = null) { if ($item = parent::getItem($pk)) { // Do any procesing on fields here if needed } return $item; }
/** * Method to get a single record. * * @param integer $pk The id of the primary key. * * @return mixed $item Object on success, false on failure. */ public function getItem($pk = null) { if ($item = parent::getItem($pk)) { if ($item->item_id) { $item->item_id_name = $this->getautoname_DB($item->item_id, 'kart_items', 'item_id', 'name'); } if ($item->user_id) { $item->user_id_name = $this->getautoname_DB($item->user_id, 'users', 'id', 'name', 'id.block <> 1'); } } //print_r($item); die; return $item; }