bound = new BpmnBound(); $this->bound->setBouElementType(lcfirst(str_replace(__NAMESPACE__, '', __CLASS__))); $this->bound->setBouElement('pm_canvas'); $this->bound->setBouContainer('bpmnDiagram'); } // OVERRIDES public function fromArray($data) { parent::fromArray($data, BasePeer::TYPE_FIELDNAME); // try resolve the related bound if (array_key_exists('BOU_UID', $data)) { $bound = BpmnBoundPeer::retrieveByPK($data['BOU_UID']); if (is_object($bound)) { $this->bound = $bound; } } $this->bound->fromArray($data, BasePeer::TYPE_FIELDNAME); } public function save($con = null) { parent::save($con); if (is_object($this->bound) && get_class($this->bound) == 'BpmnBound') { $this->bound->save($con); } } public function delete($con = null) { // first, delete the related bound object if (! is_object($this->bound)) { $this->bound = BpmnBound::findByElement('Event', $this->getActUid()); } if (is_object($this->bound)) { $this->bound->delete($con); } parent::delete($con); } public function toArray($keyType = BasePeer::TYPE_PHPNAME) { $data = parent::toArray($keyType); if (is_object($this->bound) && get_class($this->bound) == 'BpmnBound') { $data = array_merge($data, $this->bound->toArray($keyType)); } return $data; } } // BpmnEvent