class Style in Styles API 8
Same name in this branch
- 8 src/Style.php \Drupal\styles_api\Style
- 8 src/Annotation/Style.php \Drupal\styles_api\Annotation\Style
Stylesapi plugin manager.
Hierarchy
- class \Drupal\styles_api\Style
Expanded class hierarchy of Style
1 file declares its use of Style
- styles_api.module in ./
styles_api.module - Declares styles.
File
- src/
Style.php, line 12 - Contains StyleapiManager.
Namespace
Drupal\styles_apiView source
class Style {
/**
* Returns the plugin manager for the Layout plugin type.
*
* @return \Drupal\style_plugin\Plugin\Style\StylePluginManagerInterface
* Layout manager.
*/
public static function stylePluginManager() {
return \Drupal::service('plugin.manager.styles_api');
}
/**
* Return all available layout as an options array.
*
* If group_by_category option/parameter passed group the options by
* category.
*
* @param array $params
* (optional) An associative array with the following keys:
* - group_by_category: (bool) If set to TRUE, return an array of arrays
* grouped by the category name; otherwise, return a single-level
* associative array.
*
* @return array
* Layout options, as array.
*
* @deprecated
* Use \Drupal\styles_api\Plugin\Style\StylePluginManagerInterface::getLayoutOptions().
*/
public static function getStyleOptions(array $params = []) {
return static::styleapiPluginManager()
->getStyleOptions($params);
}
/**
* Return theme implementations for layouts that give only a template.
*
* @return array
* An associative array of the same format as returned by hook_theme().
*
* @see hook_theme()
*
* @deprecated
* Use \Drupal\styles_api\Plugin\Style\StylePluginManagerInterface::getThemeImplementations().
*/
public static function getThemeImplementations() {
return static::styleapiPluginManager()
->getThemeImplementations();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Style:: |
public static | function | Return all available layout as an options array. | |
Style:: |
public static | function | Return theme implementations for layouts that give only a template. | |
Style:: |
public static | function | Returns the plugin manager for the Layout plugin type. |