Changeset View
Changeset View
Standalone View
Standalone View
core/kernel/db/cat_event_handler.php
Show First 20 Lines • Show All 2877 Lines • ▼ Show 20 Line(s) | |||||
// add options for CategoryId field (quick way to select item's primary category) | // add options for CategoryId field (quick way to select item's primary category) | ||||
$category_helper = $this->Application->recallObject('CategoryHelper'); | $category_helper = $this->Application->recallObject('CategoryHelper'); | ||||
/* @var $category_helper CategoryHelper */ | /* @var $category_helper CategoryHelper */ | ||||
$virtual_fields = $config->getVirtualFields(); | $virtual_fields = $config->getVirtualFields(); | ||||
$virtual_fields['CategoryId']['default'] = (int)$this->Application->GetVar('m_cat_id'); | $virtual_fields['CategoryId']['default'] = (int)$this->Application->GetVar('m_cat_id'); | ||||
$virtual_fields['CategoryId']['options'] = $category_helper->getStructureTreeAsOptions(); | $virtual_fields['CategoryId']['options'] = $category_helper->getStructureTreeAsOptions(); | ||||
$virtual_fields['ExportPresets'] = array( | |||||
'type' => 'string', | |||||
'formatter' => 'kOptionsFormatter', 'options' => array(), | |||||
'default' => '', | |||||
); | |||||
$virtual_fields['ExportSavePreset'] = array( | |||||
'type' => 'int', | |||||
'formatter' => 'kOptionsFormatter', | |||||
'options' => array(0 => 'la_No', 1 => 'la_Yes'), | |||||
'use_phrases' => 1, 'default' => 0, | |||||
); | |||||
$virtual_fields['ExportPresetName'] = array('type' => 'string', 'default' => ''); | |||||
alex: Please make this change in the corresponding unit configs instead.
---
The affected unit… | |||||
$config->setVirtualFields($virtual_fields); | $config->setVirtualFields($virtual_fields); | ||||
} | } | ||||
/** | /** | ||||
* Changes default sorting according to system settings. | * Changes default sorting according to system settings. | ||||
* | * | ||||
* @param kEvent $event Event. | * @param kEvent $event Event. | ||||
* | * | ||||
▲ Show 20 Lines • Show All 212 Lines • Show Last 20 Lines |
Please make this change in the corresponding unit configs instead.
The affected unit configs can be changed directly, because added virtual fields doesn't contain any dynamic information in their declaration.