Differential D240 Diff 688 branches/5.2.x/core/units/system_event_subscriptions/system_event_subscription_tp.php
Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/units/system_event_subscriptions/system_event_subscription_tp.php
Show All 25 Lines | |||||
/** | /** | ||||
* Allows to show category path of selected module | * Allows to show category path of selected module | ||||
* | * | ||||
* @param Array $params | * @param Array $params | ||||
* @return string | * @return string | ||||
*/ | */ | ||||
function CategoryPath($params) | function CategoryPath($params) | ||||
{ | { | ||||
/** @var kDBItem $object */ | |||||
$object = $this->getObject($params); | $object = $this->getObject($params); | ||||
/* @var $object kDBItem */ | |||||
$category_id = $object->GetDBField('CategoryId'); | $category_id = $object->GetDBField('CategoryId'); | ||||
if ( !is_numeric($category_id) ) { | if ( !is_numeric($category_id) ) { | ||||
return ''; | return ''; | ||||
} | } | ||||
$params['cat_id'] = $category_id; | $params['cat_id'] = $category_id; | ||||
/** @var kNavigationBar $navigation_bar */ | |||||
$navigation_bar = $this->Application->recallObject('kNavigationBar'); | $navigation_bar = $this->Application->recallObject('kNavigationBar'); | ||||
/* @var $navigation_bar kNavigationBar */ | |||||
return $navigation_bar->build($params); | return $navigation_bar->build($params); | ||||
} | } | ||||
/** | /** | ||||
* Prints item name | * Prints item name | ||||
* | * | ||||
* @param Array $params | * @param Array $params | ||||
* @return string | * @return string | ||||
* @access protected | * @access protected | ||||
*/ | */ | ||||
protected function ItemName($params) | protected function ItemName($params) | ||||
{ | { | ||||
/** @var kDBList $object */ | |||||
$object = $this->getObject($params); | $object = $this->getObject($params); | ||||
/* @var $object kDBList */ | |||||
if ( !isset($this->_analyzer) ) { | if ( !isset($this->_analyzer) ) { | ||||
$this->_analyzer = new kSubscriptionAnalyzer($object); | $this->_analyzer = new kSubscriptionAnalyzer($object); | ||||
$this->_analyzer->run(); | $this->_analyzer->run(); | ||||
} | } | ||||
return $this->_analyzer->getTitle($this->SelectParam($params, 'name,field')); | return $this->_analyzer->getTitle($this->SelectParam($params, 'name,field')); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 183 Lines • ▼ Show 20 Line(s) | |||||
if ( isset($fields[$title_field]['formatter']) && $fields[$title_field]['formatter'] == 'kMultiLanguage' ) { | if ( isset($fields[$title_field]['formatter']) && $fields[$title_field]['formatter'] == 'kMultiLanguage' ) { | ||||
$lang_prefix = 'l' . $this->Application->GetVar('m_lang') . '_'; | $lang_prefix = 'l' . $this->Application->GetVar('m_lang') . '_'; | ||||
} | } | ||||
} | } | ||||
return $lang_prefix . $title_field; | return $lang_prefix . $title_field; | ||||
} | } | ||||
} | } | ||||
No newline at end of file | No newline at end of file |