class WingsuitExtension in Gin Layout Builder 8.2
Class WingsiutTheme.
@package Drupal\keytec_theme\TwigExtension
Hierarchy
- class \Drupal\Core\Template\TwigExtension extends \Drupal\Core\Template\Twig_Extension
- class \Drupal\wingsuit_ui_patterns\TwigExtension\WingsuitExtension
Expanded class hierarchy of WingsuitExtension
1 string reference to 'WingsuitExtension'
- wingsuit_ui_patterns.services.yml in modules/
wingsuit_ui_patterns/ wingsuit_ui_patterns.services.yml - modules/wingsuit_ui_patterns/wingsuit_ui_patterns.services.yml
1 service uses WingsuitExtension
- wingsuit_ui_patterns.twig in modules/
wingsuit_ui_patterns/ wingsuit_ui_patterns.services.yml - Drupal\wingsuit_ui_patterns\TwigExtension\WingsuitExtension
File
- modules/
wingsuit_ui_patterns/ src/ TwigExtension/ WingsuitExtension.php, line 15
Namespace
Drupal\wingsuit_ui_patterns\TwigExtensionView source
class WingsuitExtension extends TwigExtension {
/**
* @inheritdoc
*/
public function getFunctions() {
return [
new TwigFunction('ws_itok', [
$this,
'wsItok',
]),
new TwigFunction('uuid', [
$this,
'wsUuid',
]),
];
}
/**
* @inheritdoc
*/
public function getName() {
return 'wingsuit_companion';
}
/**
* Uses deployment key as cache key for generated svgs.
*
* @return mixed|null
*/
public static function wsItok() {
return urlencode(Settings::get('deployment_identifier'));
}
/**
* Returns a unique id.
*
* @return mixed|null
*/
public static function wsUuid() {
return Html::getId(\Drupal::service('uuid')
->generate());
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
TwigExtension:: |
protected | property | The date formatter. | |
TwigExtension:: |
protected | property | The renderer. | |
TwigExtension:: |
protected | property | The theme manager. | |
TwigExtension:: |
protected | property | The URL generator. | |
TwigExtension:: |
public | function | Attaches an asset library to the template, and hence to the response. | |
TwigExtension:: |
protected | function | Bubbles Twig template argument's cacheability & attachment metadata. | |
TwigExtension:: |
public | function | Creates an Attribute object. | |
TwigExtension:: |
public | function | Overrides twig_escape_filter(). | |
TwigExtension:: |
public | function | Provides a placeholder wrapper around ::escapeFilter. | |
TwigExtension:: |
public | function | Gets the name of the active theme. | |
TwigExtension:: |
public | function | Gets the path of the active theme. | |
TwigExtension:: |
public | function | ||
TwigExtension:: |
public | function | Gets a rendered link from a url object. | |
TwigExtension:: |
public | function | ||
TwigExtension:: |
public | function | Generates a URL path given a route name and parameters. | |
TwigExtension:: |
public | function | ||
TwigExtension:: |
public | function | Generates an absolute URL given a route name and parameters. | |
TwigExtension:: |
public | function | Determines at compile time whether the generated URL will be safe. | |
TwigExtension:: |
public | function | Wrapper around render() for twig printed output. | |
TwigExtension:: |
public | function | Joins several strings together safely. | |
TwigExtension:: |
public | function | Sets the date formatter. | |
TwigExtension:: |
public | function | Sets the URL generator. | |
TwigExtension:: |
public | function | Sets the theme manager. | |
TwigExtension:: |
public | function | Sets the URL generator. | |
TwigExtension:: |
public | function | Removes child elements from a copy of the original array. | |
TwigExtension:: |
public | function | Constructs \Drupal\Core\Template\TwigExtension. | |
WingsuitExtension:: |
public | function |
@inheritdoc Overrides TwigExtension:: |
|
WingsuitExtension:: |
public | function |
@inheritdoc Overrides TwigExtension:: |
|
WingsuitExtension:: |
public static | function | Uses deployment key as cache key for generated svgs. | |
WingsuitExtension:: |
public static | function | Returns a unique id. |