/** * Returns simple entity description by entity type. Use in templates. * * @param string $type * @return hash */ public function getEntityDescriptionByType($type) { $result = array(); $result['fields'] = $this->_mapper->fields('entity_' . $type); $result['rules'] = $this->_mapper->rules('entity_' . $type); return $result; }
/** * Enter description here... * * @return bool */ protected function _checkData() { if ($this->_typeProps) { if ($rules = $this->_mapper->rules('entity_' . $this->type)) { $validator = M('Validator')->create($rules); $validator->check(array_merge($this->_props, $this->_typeProps)); } } return TRUE; }