示例#1
0
 function addToBodyAttributes($out, &$bodyAttrs)
 {
     parent::addToBodyAttributes($out, $bodyAttrs);
     $current_user = UserManager::instance()->getCurrentUser();
     $sidebar_state = $current_user->getPreference('sidebar_state');
     if (!$sidebar_state) {
         $sidebar_state = 'sidebar-expanded';
     }
     $bodyAttrs['class'] .= ' has_sidebar ' . $sidebar_state;
     if ($current_user->getTheme() === 'FlamingParrot') {
         $bodyAttrs['class'] .= ' ' . $current_user->getPreference('theme_variant');
     }
 }