Пример #1
0
 /**
  * Return an array of information about user-selectable themes.  Each entry in
  * the array is an associative array with 'name', 'desc' and 'selected' keys.
  *
  * @return array
  */
 protected function getThemeOptions()
 {
     $options = [];
     if (isset($this->config->selectable_themes)) {
         $parts = explode(',', $this->config->selectable_themes);
         foreach ($parts as $part) {
             $subparts = explode(':', $part);
             $name = trim($subparts[0]);
             $desc = isset($subparts[1]) ? trim($subparts[1]) : '';
             $desc = empty($desc) ? $name : $desc;
             if (!empty($name)) {
                 $options[] = ['name' => $name, 'desc' => $desc, 'selected' => $this->cookieManager->get('ui') == $name];
             }
         }
     }
     return $options;
 }
Пример #2
0
 /**
  * Checks whether the user has recently logged out.
  *
  * @return bool
  */
 public function userHasLoggedOut()
 {
     return (bool) $this->cookieManager->get('loggedOut');
 }