public function __construct() { $this->decorators[X_VlcShares_Skins_Manager::DUMMY] = X_VlcShares_Skins_Default_Dummy::i(); $this->decorators[X_VlcShares_Skins_Manager::PORTION] = X_VlcShares_Skins_Default_Dummy::i(); $this->decorators[X_VlcShares_Skins_Manager::CONTAINER] = new X_VlcShares_Skins_Default_Container(); $this->decorators[X_VlcShares_Skins_Manager::SECTIONCONTAINER] = new X_VlcShares_Skins_Default_SectionContainer(); $this->decorators[X_VlcShares_Skins_Manager::SECTION] = new X_VlcShares_Skins_Default_Section(); $this->decorators[X_VlcShares_Skins_Manager::BLOCK] = new X_VlcShares_Skins_Default_Block(); $this->decorators[X_VlcShares_Skins_Manager::BLOCK_DISABLED] = new X_VlcShares_Skins_Default_Block(array('variant' => 'disabled')); $this->decorators[X_VlcShares_Skins_Manager::BLOCK_HIGHLIGHT] = new X_VlcShares_Skins_Default_Block(array('variant' => 'red')); $this->decorators[X_VlcShares_Skins_Manager::INNERBLOCK] = new X_VlcShares_Skins_Default_InnerBlock(); $this->decorators[X_VlcShares_Skins_Manager::INNERBLOCK_DISABLED] = new X_VlcShares_Skins_Default_InnerBlock(array('variant' => 'disabled')); $this->decorators[X_VlcShares_Skins_Manager::INNERBLOCK_HIGHLIGHT] = new X_VlcShares_Skins_Default_InnerBlock(array('variant' => 'red')); $this->decorators[X_VlcShares_Skins_Manager::MENU] = new X_VlcShares_Skins_Default_Menu(); $this->decorators[X_VlcShares_Skins_Manager::MENU_BREADCRUMB] = new X_VlcShares_Skins_Default_Breadcrumb(); $this->decorators[X_VlcShares_Skins_Manager::MENU_CONTEXTUAL] = new X_VlcShares_Skins_Default_Menu(); //$this->decorators[X_VlcShares_Skins_Manager::MENU_CONTEXTUAL] = new X_VlcShares_Skins_Default_MenuContextual(); //$this->decorators[X_VlcShares_Skins_Manager::MENU_STATUS] = new X_VlcShares_Skins_Default_StatusBar(); //$this->decorators[X_VlcShares_Skins_Manager::MENU_TOOLBAR] = new X_VlcShares_Skins_Default_ToolBar(); $this->decorators[X_VlcShares_Skins_Manager::MENUENTRY_LABEL] = new X_VlcShares_Skins_Default_MenuEntry(array('type' => 'label')); $this->decorators[X_VlcShares_Skins_Manager::MENUENTRY_LABEL_DISABLED] = new X_VlcShares_Skins_Default_MenuEntry(array('type' => 'label', 'variant' => 'disabled')); $this->decorators[X_VlcShares_Skins_Manager::MENUENTRY_LABEL_HIGHLIGHT] = new X_VlcShares_Skins_Default_MenuEntry(array('type' => 'label', 'variant' => 'highlight')); $this->decorators[X_VlcShares_Skins_Manager::MENUENTRY_BUTTON] = new X_VlcShares_Skins_Default_MenuEntry(array('type' => 'button')); $this->decorators[X_VlcShares_Skins_Manager::MENUENTRY_BUTTON_DISABLED] = new X_VlcShares_Skins_Default_MenuEntry(array('type' => 'button', 'variant' => 'disabled')); $this->decorators[X_VlcShares_Skins_Manager::MENUENTRY_BUTTON_HIGHLIGHT] = new X_VlcShares_Skins_Default_MenuEntry(array('type' => 'button', 'variant' => 'highlight')); $this->decorators[X_VlcShares_Skins_Manager::MENUENTRY_LINK] = new X_VlcShares_Skins_Default_MenuEntry(array('type' => 'link')); $this->decorators[X_VlcShares_Skins_Manager::MENUENTRY_LINK_DISABLED] = new X_VlcShares_Skins_Default_MenuEntry(array('type' => 'link', 'variant' => 'disabled')); $this->decorators[X_VlcShares_Skins_Manager::MENUENTRY_LINK_HIGHLIGHT] = new X_VlcShares_Skins_Default_MenuEntry(array('type' => 'link', 'variant' => 'highlight')); $this->decorators[X_VlcShares_Skins_Manager::MENUENTRY_SUBMENU] = new X_VlcShares_Skins_Default_Menu(); $this->decorators[X_VlcShares_Skins_Manager::MENUENTRY_SUBMENU_DISABLED] = new X_VlcShares_Skins_Default_Menu(array('variant' => 'disabled')); $this->decorators[X_VlcShares_Skins_Manager::MENUENTRY_SUBMENU_HIGHLIGHT] = new X_VlcShares_Skins_Default_Menu(array('variant' => 'highlight')); $this->decorators[X_VlcShares_Skins_Manager::TABLE] = new X_VlcShares_Skins_Default_Table(); $this->decorators[X_VlcShares_Skins_Manager::TABLEROW] = new X_VlcShares_Skins_Default_TableRow(); $this->decorators[X_VlcShares_Skins_Manager::TABLEROW_ALTERNATE] = new X_VlcShares_Skins_Default_TableRow(array('variant' => 'alternate')); $this->decorators[X_VlcShares_Skins_Manager::TABLEROW_HEADER] = new X_VlcShares_Skins_Default_TableRowHeader(); $this->decorators[X_VlcShares_Skins_Manager::TABLECELL] = new X_VlcShares_Skins_Default_TableCell(); }
/** * Get the skin decorator for the element type. If $type is unknown can throws * exception or return a Default_Dummy decorator reference * @param string $type * @return X_VlcShares_Skins_DecoratorInterface * @throws Exception if $type is unknown and throwsException is true */ public function getDecorator($type) { try { return $this->getSkin()->getDecorator($type, self::DUMMY); } catch (Exception $e) { X_Debug::e($e->getMessage()); if ($this->_flag_throws) { throw $e; } else { // return a reference to default dummy decorator return X_VlcShares_Skins_Default_Dummy::i(); } } }