/** * Import term. * * @param Term $term */ public function import_term(Term $term) { // Term ID on production environment. $term_id = $this->term_dao->get_term_id_by_slug($term->get_slug()); $term->set_id($term_id); if (!$term->get_id()) { // This term does not exist on production, create it. $this->term_dao->insert($term); } else { // This term exists on production, update it. $this->term_dao->update_term($term); } }