public function updateRelationType()
 {
     try {
         $model = new RelationType($this->data->relationtype->idRelationType);
         $this->data->relationtype->entry = 'rel_' . str_replace('rel_', '', strtolower($this->data->relationtype->entry));
         $model->updateEntry($this->data->relationtype->entry);
         $this->renderPrompt('information', 'OK', "structure.editEntry('{$this->data->relationtype->entry}');");
     } catch (\Exception $e) {
         $this->renderPrompt('error', $e->getMessage());
     }
 }
 public function delSemanticTypeFromEntity($idEntity, $idSemanticTypeEntity = [])
 {
     $rt = new RelationType();
     $c = $rt->getCriteria()->select('idRelationType')->where("entry = 'rel_hassemtype'");
     $er = new EntityRelation();
     $transaction = $er->beginTransaction();
     $criteria = $er->getDeleteCriteria();
     $criteria->where("idEntity1 = {$idEntity}");
     $criteria->where("idEntity2", "IN", $idSemanticTypeEntity);
     $criteria->where("idRelationType", "=", $c);
     $criteria->delete();
     $transaction->commit();
 }