public function getProp($sKey, $xDefault = NULL) { if ($sKey == 'type_name' || $sKey == 'type_description') { $sValue = parent::getProp($sKey); if (!$sValue) { $sValue = str_replace('%%type_code%%', $this->getTypeCode(), $this->aDefaults[$sKey]); } return $sValue; } return parent::getProp($sKey, $xDefault); }
/** * Callback function for entities array sorting * * @param Entity $oEntity1 * @param Entity $oEntity2 * * @return int */ public static function _sortByProp($oEntity1, $oEntity2) { if ($oEntity1->getProp(self::$sSortProp) == $oEntity2->getProp(self::$sSortProp)) { return 0; } return $oEntity1->getProp(self::$sSortProp) < $oEntity2->getProp(self::$sSortProp) ? -1 * self::$iSortDirect : 1 * self::$iSortDirect; }
/** * Returns widget parameters * * @return array */ public function GetParams() { return (array) parent::getProp('params'); }