public function generatePalette()
	{
		if(\Input::get('table') != 'tl_layout' || \Input::get('act') != 'edit')
		{
			return;
		}

		$layout = $this->getCurrentLayout();

		if($layout->layoutType == 'bootstrap')
		{
			// dynamically render palette so that extensions can plug into default palette
			$GLOBALS['TL_DCA']['tl_layout']['metapalettes']['__base__'] = $this->getMetaPaletteOfPalette('tl_layout');
			$GLOBALS['TL_DCA']['tl_layout']['metapalettes']['default extends __base__']  = $GLOBALS['BOOTSTRAP']['layout']['metapalette'];

			unset($GLOBALS['TL_DCA']['tl_layout']['palettes']['default']);

			foreach($GLOBALS['BOOTSTRAP']['layout']['metasubselectpalettes'] as $field => $meta)
			{
				foreach($meta as $value => $definition)
				{
					unset($GLOBALS['TL_DCA']['tl_layout']['subpalettes'][$field . '_' . $value]);
					$GLOBALS['TL_DCA']['tl_layout']['metasubselectpalettes'][$field][$value] = $definition;
				}
			}
		}
		else
		{
			\MetaPalettes::appendFields('tl_layout', 'title', array('layoutType'));
		}
	}
public function generatePalette()
	{
		if(\Input::get('table') != 'tl_layout' || \Input::get('act') != 'edit')
		{
			return;
		}

		$layout = $this->getCurrentLayout();

		if($layout->layoutType == 'bootstrap')
		{
			// dynamically render palette so that extensions can plug into default palette
			$GLOBALS['TL_DCA']['tl_layout']['metapalettes']['__base__'] = $this->getMetaPaletteOfPalette('tl_layout');
			$GLOBALS['TL_DCA']['tl_layout']['metapalettes']['default extends __base__']  = $GLOBALS['BOOTSTRAP']['layout']['metapalette'];

			unset($GLOBALS['TL_DCA']['tl_layout']['palettes']['default']);

			foreach($GLOBALS['BOOTSTRAP']['layout']['metasubselectpalettes'] as $field => $meta)
			{
				foreach($meta as $value => $definition)
				{
					unset($GLOBALS['TL_DCA']['tl_layout']['subpalettes'][$field . '_' . $value]);
					$GLOBALS['TL_DCA']['tl_layout']['metasubselectpalettes'][$field][$value] = $definition;
				}
			}
		}
		else
		{
			\MetaPalettes::appendFields('tl_layout', 'title', array('layoutType'));
		}
	}
public function generatePalette ( ) { if ( \ Input :: get ( 'table' ) != 'tl_layout' || \ Input :: get ( 'act' ) != 'edit' ) { return ; } $ layout = $ this -> getCurrentLayout ( ) ; if ( $ layout -> layoutType == 'bootstrap' ) { // dynamically render palette so that extensions can plug into default palette $ GLOBALS [ 'TL_DCA' ] [ 'tl_layout' ] [ 'metapalettes' ] [ '__base__' ] = $ this -> getMetaPaletteOfPalette ( 'tl_layout' ) ; $ GLOBALS [ 'TL_DCA' ] [ 'tl_layout' ] [ 'metapalettes' ] [ 'default extends __base__' ] = $ GLOBALS [ 'BOOTSTRAP' ] [ 'layout' ] [ 'metapalette' ] ; unset ( $ GLOBALS [ 'TL_DCA' ] [ 'tl_layout' ] [ 'palettes' ] [ 'default' ] ) ; foreach ( $ GLOBALS [ 'BOOTSTRAP' ] [ 'layout' ] [ 'metasubselectpalettes' ] as $ field => $ meta ) { foreach ( $ meta as $ value => $ definition ) { unset ( $ GLOBALS [ 'TL_DCA' ] [ 'tl_layout' ] [ 'subpalettes' ] [ $ field . '_' . $ value ] ) ; $ GLOBALS [ 'TL_DCA' ] [ 'tl_layout' ] [ 'metasubselectpalettes' ] [ $ field ] [ $ value ] = $ definition ; } } } else { \ MetaPalettes :: appendFields ( 'tl_layout' , 'title' , array ( 'layoutType' ) ) ; } }
modify palette if bootstrap is used

@hook palettes_hook (MetaPalettes)
modify palette if bootstrap is used