public function reset() {
        $map = $this->registry->getMap();
        if(empty($map['items']['available'])) {
            return false;
        }
        foreach($map['items']['available'] as $theme) {
            // exclude themes that don't belong to this customer
            if($theme['id'] === 'tao' || 0 !== strpos($theme['id'], $this->extensionId)) {
                continue;
            }
            $this->registry->unregisterTheme($theme['id']);
        }
        // get the now updated map
        $map = $this->registry->getMap();

        $taoTheme = array(
            'id' => 'tao',
            'name' => 'TAO',
            'path' => $this->getStylesheetPath('tao')
        );

        if(!$this->themeExists('tao')) {
            array_unshift($map['items']['available'], $taoTheme);
        }

        $this->registry->set('items', array(
            'base'  => $map['items']['base'],
            // potential other themes have not been removed
            'available' => $map['items']['available'],
            'default' => 'tao'
        ));

        $this->logInfo('Removed ' . $this->extensionId . ' themes, restored TAO default');
        return true;
    }
public function reset() {
        $map = $this->registry->getMap();
        if(empty($map['items']['available'])) {
            return false;
        }
        foreach($map['items']['available'] as $theme) {
            // exclude themes that don't belong to this customer
            if($theme['id'] === 'tao' || 0 !== strpos($theme['id'], $this->extensionId)) {
                continue;
            }
            $this->registry->unregisterTheme($theme['id']);
        }
        // get the now updated map
        $map = $this->registry->getMap();

        $taoTheme = array(
            'id' => 'tao',
            'name' => 'TAO',
            'path' => $this->getStylesheetPath('tao')
        );

        if(!$this->themeExists('tao')) {
            array_unshift($map['items']['available'], $taoTheme);
        }

        $this->registry->set('items', array(
            'base'  => $map['items']['base'],
            // potential other themes have not been removed
            'available' => $map['items']['available'],
            'default' => 'tao'
        ));

        $this->logInfo('Removed ' . $this->extensionId . ' themes, restored TAO default');
        return true;
    }
public function reset ( ) { $ map = $ this -> registry -> getMap ( ) ; if ( empty ( $ map [ 'items' ] [ 'available' ] ) ) { return false ; } foreach ( $ map [ 'items' ] [ 'available' ] as $ theme ) { // exclude themes that don't belong to this customer if ( $ theme [ 'id' ] === 'tao' || 0 !== strpos ( $ theme [ 'id' ] , $ this -> extensionId ) ) { continue ; } $ this -> registry -> unregisterTheme ( $ theme [ 'id' ] ) ; } // get the now updated map $ map = $ this -> registry -> getMap ( ) ; $ taoTheme = array ( 'id' => 'tao' , 'name' => 'TAO' , 'path' => $ this -> getStylesheetPath ( 'tao' ) ) ; if ( ! $ this -> themeExists ( 'tao' ) ) { array_unshift ( $ map [ 'items' ] [ 'available' ] , $ taoTheme ) ; } $ this -> registry -> set ( 'items' , array ( 'base' => $ map [ 'items' ] [ 'base' ] , // potential other themes have not been removed 'available' => $ map [ 'items' ] [ 'available' ] , 'default' => 'tao' ) ) ; $ this -> logInfo ( 'Removed ' . $ this -> extensionId . ' themes, restored TAO default' ) ; return true ; }
Reset the item theme registry to its initial values

@return bool|\common_report_Report
Reset the item theme registry to its initial values