Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/units/sections/site_config_tp.php
Show All 18 Lines | |||||
function PrintEditingModes($params) | function PrintEditingModes($params) | ||||
{ | { | ||||
$editing_modes = Array ( | $editing_modes = Array ( | ||||
EDITING_MODE_BROWSE => Array ('image' => 'browse_site_mode', 'title' => 'la_btn_BrowseMode'), | EDITING_MODE_BROWSE => Array ('image' => 'browse_site_mode', 'title' => 'la_btn_BrowseMode'), | ||||
EDITING_MODE_CONTENT => Array ('image' => 'content_mode', 'title' => 'la_btn_ContentMode'), | EDITING_MODE_CONTENT => Array ('image' => 'content_mode', 'title' => 'la_btn_ContentMode'), | ||||
EDITING_MODE_DESIGN => Array ('image' => 'design_mode', 'title' => 'la_btn_DesignMode'), | EDITING_MODE_DESIGN => Array ('image' => 'design_mode', 'title' => 'la_btn_DesignMode'), | ||||
); | ); | ||||
/** @var SiteConfigHelper $site_config_helper */ | |||||
$site_config_helper = $this->Application->recallObject('SiteConfigHelper'); | $site_config_helper = $this->Application->recallObject('SiteConfigHelper'); | ||||
/* @var $site_config_helper SiteConfigHelper */ | |||||
$settings = $site_config_helper->getSettings(); | $settings = $site_config_helper->getSettings(); | ||||
foreach ($editing_modes as $editing_mode => $data) { | foreach ($editing_modes as $editing_mode => $data) { | ||||
if (!in_array($editing_mode, $settings['visible_editing_modes'])) { | if (!in_array($editing_mode, $settings['visible_editing_modes'])) { | ||||
unset($editing_modes[$editing_mode]); | unset($editing_modes[$editing_mode]); | ||||
} | } | ||||
} | } | ||||
Show All 15 Lines | |||||
$ret .= $this->Application->ParseBlock($block_params); | $ret .= $this->Application->ParseBlock($block_params); | ||||
$i++; | $i++; | ||||
} | } | ||||
return $ret; | return $ret; | ||||
} | } | ||||
} | } | ||||
No newline at end of file | No newline at end of file |