Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/units/helpers/site_config_helper.php
| Show First 20 Lines • Show All 81 Lines • ▼ Show 20 Line(s) | |||||
| /** | /** | ||||
| * Applies given changes to given prefix unit config | * Applies given changes to given prefix unit config | ||||
| * | * | ||||
| * @param string $prefix | * @param string $prefix | ||||
| * @param Array $changes | * @param Array $changes | ||||
| */ | */ | ||||
| function processConfigChanges($prefix, $changes) | function processConfigChanges($prefix, $changes) | ||||
| { | { | ||||
| extract($changes); | extract($changes, EXTR_SKIP); | ||||
| $section_adjustments = $this->Application->getUnitOption('core-sections', 'SectionAdjustments', Array ()); | $section_adjustments = $this->Application->getUnitOption('core-sections', 'SectionAdjustments', Array ()); | ||||
| $title_presets = $this->Application->getUnitOption($prefix, 'TitlePresets', Array ()); | $title_presets = $this->Application->getUnitOption($prefix, 'TitlePresets', Array ()); | ||||
| $fields = $this->Application->getUnitOption($prefix, 'Fields', Array ()); | $fields = $this->Application->getUnitOption($prefix, 'Fields', Array ()); | ||||
| $virtual_fields = $this->Application->getUnitOption($prefix, 'VirtualFields', Array ()); | $virtual_fields = $this->Application->getUnitOption($prefix, 'VirtualFields', Array ()); | ||||
| $edit_tab_presets = $this->Application->getUnitOption($prefix, 'EditTabPresets', Array ()); | $edit_tab_presets = $this->Application->getUnitOption($prefix, 'EditTabPresets', Array ()); | ||||
| $grids = $this->Application->getUnitOption($prefix, 'Grids', Array ()); | $grids = $this->Application->getUnitOption($prefix, 'Grids', Array ()); | ||||
| ▲ Show 20 Lines • Show All 105 Lines • ▼ Show 20 Line(s) | |||||
| // set given option to given fields | // set given option to given fields | ||||
| foreach ($set_fields as $set_field) { | foreach ($set_fields as $set_field) { | ||||
| $fields[$set_field][$option_name] = $option_value; | $fields[$set_field][$option_name] = $option_value; | ||||
| } | } | ||||
| return $fields; | return $fields; | ||||
| } | } | ||||
| } | } | ||||
| No newline at end of file | |||||