Common & useful classes, resources, extensions. Based on Symfony framework.
Located here: Meritoo\CommonBundle\Twig\ApplicationExtension
. It's Twig extension related to
the ApplicationService service. Allows to use functionality provided by
the ApplicationService
service in Twig templates.
Returns descriptor of application. Exactly as Meritoo\CommonBundle\Service\ApplicationService::getDescriptor()
method.
Example below.
Name of application may be defined in config/packages/meritoo_common.yaml
configuration file:
meritoo_common:
application:
name: My App
Let's display name of application:
<title>{{ meritoo_common_application_descriptor().name }}</title>
Result:
<title>My App</title>
- Configuration
- Dependency Injection Extension
- Descriptor of application
- Descriptor of bundle
- Descriptors of bundles
- Services:
- Tests
- Translations
- Twig extensions: