function set_fields($db_object) { parent::set_fields($db_object); if ($this->warnings) { $this->warnings = maybe_unserialize($this->warnings); } }
public function __construct($fields = array()) { parent::__construct($fields); $this->setup_pos(); }
/** * Deletes a glossary and all of it's entries. * * @since 2.0.0 * * @return bool */ public function delete() { GP::$glossary_entry->delete_many(array('glossary_id', $this->id)); return parent::delete(); }
/** * Deletes a project and all of sub projects, translations, translation sets, originals and glossaries. * * @since 2.0.0 * * @return bool */ public function delete() { GP::$project->delete_many(array('parent_project_id' => $this->id)); GP::$translation_set->delete_many(array('project_id' => $this->id)); GP::$original->delete_many(array('project_id' => $this->id)); return parent::delete(); }
/** * Deletes a translation set and all of it's translations and glossaries. * * @since 2.0.0 * * @return bool */ public function delete() { GP::$translation->delete_many(array('translation_set_id' => $this->id)); GP::$glossary->delete_many(array('translation_set_id', $this->id)); return parent::delete(); }