Ejemplo n.º 1
0
 /**
  * Define body classes
  *
  * @param array $classes Classes
  *
  * @return array
  */
 public function defineBodyClasses(array $classes)
 {
     $classes = parent::defineBodyClasses($classes);
     $auth = \XLite\Core\Auth::getInstance();
     if ($auth->isLogged() && $auth->getProfile()->isAdmin() == \XLite::isAdminZone()) {
         $flags = \XLite\Core\Marketplace::getInstance()->checkForUpdates();
         if (is_array($flags) && (!empty($flags[\XLite\Core\Marketplace::FIELD_ARE_UPDATES_AVAILABLE]) || !empty($flags[\XLite\Core\Marketplace::FIELD_IS_UPGRADE_AVAILABLE]))) {
             $classes[] = 'upgrade-box-visible';
         }
         if (!empty($_COOKIE['XCAdminLeftMenuCompressed'])) {
             $classes[] = 'left-menu-compressed';
         }
     }
     if ($auth->isAdmin()) {
         $classes[] = 'login-page';
     }
     if ($this->isForceChangePassword()) {
         $classes[] = 'force-change-password-section';
     }
     return $classes;
 }