public function listCE()
 {
     $ce = new ConstructionElement();
     $criteria = $ce->getCriteria()->select('idConstructionElement, entry, entries.name as name, color.rgbFg, color.rgbBg, color.idColor');
     Base::entryLanguage($criteria);
     Base::relation($criteria, 'constructionelement', 'construction', 'rel_elementof');
     $criteria->where("construction.idConstruction = {$this->getId()}");
     $criteria->orderBy('entries.name');
     return $criteria;
 }
Ejemplo n.º 2
0
 public function updateCxnElement()
 {
     try {
         $model = new ConstructionElement($this->data->cxnelement->idConstructionElement);
         $model->updateEntry($this->data->cxnelement->entry);
         $model->setData($this->data->cxnelement);
         $model->save($this->data->cxnelement);
         $this->renderPrompt('information', 'OK', "structure.editEntry('{$this->data->cxnelement->entry}');");
     } catch (\Exception $e) {
         $this->renderPrompt('error', $e->getMessage());
     }
 }