. * * @file * @ingroup Bootstrap */ /** * Class describing the V3 Bootstrap module definitions */ class V3ModuleDefinition implements ModuleDefinition { static private $moduleDescriptions = array( 'variables' => array( 'styles' => 'variables' ), 'mixins' => array( 'styles' => 'mixins' ), 'normalize' => array( 'styles' => 'normalize' ), 'print' => array( 'styles' => 'print' ), 'scaffolding' => array( 'styles' => 'scaffolding' ), 'type' => array( 'styles' => 'type' ), 'code' => array( 'styles' => 'code' ), 'grid' => array( 'styles' => 'grid' ), 'tables' => array( 'styles' => 'tables' ), 'forms' => array( 'styles' => 'forms' ), 'buttons' => array( 'styles' => 'buttons' ), 'component-animations' => array( 'styles' => 'component-animations' ), 'glyphicons' => array( 'styles' => 'glyphicons' ), 'dropdowns' => array( 'styles' => 'dropdowns' ), 'button-groups' => array( 'styles' => 'button-groups' ), 'input-groups' => array( 'styles' => 'input-groups' ), 'navs' => array( 'styles' => 'navs' ), 'navbar' => array( 'styles' => 'navbar' ), 'breadcrumbs' => array( 'styles' => 'breadcrumbs' ), 'pagination' => array( 'styles' => 'pagination' ), 'pager' => array( 'styles' => 'pager' ), 'labels' => array( 'styles' => 'labels' ), 'badges' => array( 'styles' => 'badges' ), 'jumbotron' => array( 'styles' => 'jumbotron' ), 'thumbnails' => array( 'styles' => 'thumbnails' ), 'alerts' => array( 'styles' => 'alerts' ), 'progress-bars' => array( 'styles' => 'progress-bars' ), 'media' => array( 'styles' => 'media' ), 'list-group' => array( 'styles' => 'list-group' ), 'panels' => array( 'styles' => 'panels' ), 'wells' => array( 'styles' => 'wells' ), 'close' => array( 'styles' => 'close' ), // Components w/ JavaScript 'modals' => array( 'styles' => 'modals', 'scripts' => 'modal' ), 'tooltip' => array( 'styles' => 'tooltip', 'scripts' => 'tooltip' ), 'popovers' => array( 'styles' => 'popovers', 'scripts' => 'popover', 'dependencies' => 'tooltip' ), 'carousel' => array( 'styles' => 'carousel', 'scripts' => 'carousel' ), // Utility classes 'utilities' => array( 'styles' => 'utilities' ), 'responsive-utilities' => array( 'styles' => 'responsive-utilities' ), // JS-only components 'affix' => array( 'scripts' => 'affix' ), 'alert' => array( 'scripts' => 'alert' ), 'button' => array( 'scripts' => 'button' ), 'collapse' => array( 'scripts' => 'collapse' ), 'dropdown' => array( 'scripts' => 'dropdown' ), 'scrollspy' => array( 'scripts' => 'scrollspy' ), 'tab' => array( 'scripts' => 'tab' ), 'transition' => array( 'scripts' => 'transition' ), ); static private $coreModules = array( 'variables', 'mixins', 'normalize', 'print', 'scaffolding', 'type', 'code', 'grid', 'tables', 'forms', 'buttons' ); static private $optionalModules = array( 'component-animations', 'glyphicons', 'dropdowns', 'button-groups', 'input-groups', 'navs', 'navbar', 'breadcrumbs', 'pagination', 'pager', 'labels', 'badges', 'jumbotron', 'thumbnails', 'alerts', 'progress-bars', 'media', 'list-group', 'panels', 'wells', 'close', 'modals', 'tooltip', 'popovers', 'carousel', 'utilities', 'responsive-utilities', 'affix', 'alert', 'button', 'collapse', 'dropdown', 'scrollspy', 'tab', 'transition' ); /** * @see ModuleDefinition::get * * @since 1.0 * * @param string $key * * @return array * @throws InvalidArgumentException */ public function get( $key ) { switch ( $key ) { case 'core': return self::$coreModules; case 'optional': return self::$optionalModules; case 'descriptions': return self::$moduleDescriptions; } throw new InvalidArgumentException( 'Expected a valid key' ); } }