generate:twig:extension

Generate a Twig extension.

Usage:

drupal generate:twig:extension  [options]
gte

Available options

OptionDetails

--module

Tên module.

--name

Twig Extension name

--class

Class name

--services

Nạp các dịch vụ từ container.

Examples

Generate a twig extension specifying the module name, the extension name and its class

drupal generate:twig:extension  \
  --module="modulename"  \
  --name="modulename.twig.extension"  \
  --class="DefaultTwigExtension"