public function getSubElement() { return scenarioSubElement::byId($this->getScenarioSubElement_id()); }
public function getSubElement($_type = '') { if ($_type != '') { if (isset($this->_subelement[$_type]) && is_object($this->_subelement[$_type])) { return $this->_subelement[$_type]; } $this->_subelement[$_type] = scenarioSubElement::byScenarioElementId($this->getId(), $_type); return $this->_subelement[$_type]; } else { if (count($this->_subelement[-1]) > 0) { return $this->_subelement[-1]; } $this->_subelement[-1] = scenarioSubElement::byScenarioElementId($this->getId(), $_type); return $this->_subelement[-1]; } }