public function getElementType() { if (!$this->_element_type) { $this->_element_type = ElementType::model()->find('class_name=?', array(get_class($this))); } return $this->_element_type; }
/** * @param BaseEventTypeElement $element */ public function findAllByElement($element) { $element_type = $element->getElementType(); return $this->findAll('element_type_id = :element_type_id', array(':element_type_id' => $element_type->id)); }