/** * Additional to the parent method the item will be set @b valid per default. */ public function clear() { parent::clear(); // new item should be valid $this->setValue('inv_valid', 1); $this->columnsValueChanged = false; }
/** Initialize all necessary data of this object. */ public function clear() { parent::clear(); $this->bCheckChildOrganizations = false; $this->childOrganizations = array(); $this->preferences = array(); }
/** * Additional to the parent method the user will be set @b valid per default. */ public function clear() { parent::clear(); // new user should be valid (except registration) $this->setValue('usr_valid', 1); $this->columnsValueChanged = false; }
/** * Calls clear() Method of parent class and initialize child class specific parameters */ public function clear() { parent::clear(); // initialize class members $this->countLeaders = -1; $this->countMembers = -1; }
/** * Save all changed columns of the recordset in table of database. Therefore the class remembers if it's * a new record or if only an update is necessary. The update statement will only update the changed columns. * If the table has columns for creator or editor than these column with their timestamp will be updated. * Saves also all roles that could see this date. * @param bool $updateFingerPrint Default @b true. Will update the creator or editor of the recordset * if table has columns like @b usr_id_create or @b usr_id_changed * @return bool */ public function save($updateFingerPrint = true) { $this->db->startTransaction(); parent::save($updateFingerPrint); if ($this->changeVisibleRoles) { // Sichbarkeit der Rollen wegschreiben if (!$this->new_record) { // erst einmal alle bisherigen Rollenzuordnungen loeschen, damit alles neu aufgebaut werden kann $sql = 'DELETE FROM ' . TBL_DATE_ROLE . ' WHERE dtr_dat_id = ' . $this->getValue('dat_id'); $this->db->query($sql); } // nun alle Rollenzuordnungen wegschreiben $date_role = new TableAccess($this->db, TBL_DATE_ROLE, 'dtr'); foreach ($this->visibleRoles as $roleID) { if (is_numeric($roleID)) { if ($roleID > 0) { $date_role->setValue('dtr_rol_id', $roleID); } $date_role->setValue('dtr_dat_id', $this->getValue('dat_id')); $date_role->save(); $date_role->clear(); } } } $this->changeVisibleRoles = false; $result = $this->db->endTransaction(); return $result; }