예제 #1
0
 public function configure(array $options = array())
 {
     $options['default'] = null;
     foreach ($options['list'] as $themeName => $themeConfig) {
         // enabled options defaults to true
         if (null === dmArray::get($themeConfig, 'enabled')) {
             $options['list'][$themeName]['enabled'] = true;
         }
         // first enabled theme is the default theme
         if (null === $options['default'] && $options['list'][$themeName]['enabled']) {
             $options['default'] = $themeName;
         }
         // path is renamed to dir BC 5.0_BETA6
         if (isset($options['list'][$themeName]['path'])) {
             $options['list'][$themeName]['dir'] = $options['list'][$themeName]['path'];
             unset($options['list'][$themeName]['path']);
         }
         // theme key is the theme name
         $options['list'][$themeName]['name'] = $themeName;
     }
     if (null === $options['default']) {
         throw new dmException('No theme is enabled!');
     }
     return parent::configure($options);
 }
 public function configure(array $options = array())
 {
     parent::configure($options);
     return $this;
 }