Expression Language Syntax
Expression Language Syntax
Drutiny uses Symfony's Expression Language to enable Policies to provide depenency management and in some cases custom analysis (subject to if the Audit supports it).
The table below documents syntax Drutiny provides in addition to those provided by Symfony.
Function | Usage example | Description |
---|---|---|
AcquiaEnv | AcquiaEnv() |
Returns the environment object from Acquia Cloud API v2. |
policy | policy('Test:Pass') |
Returns the AuditReponse type of an audited policy. |
semver_gt | semver_gt('8.1.4', '8.4.x-alpha1') |
Use composer SemVer (semantic versioning) to evaluate if the first argument is greater than (gt) the second argument. |
semver_gte | semver_gte('8.1.4', '8.4.x-alpha1') |
Use composer SemVer (semantic versioning) to evaluate if the first argument is greater or equal (gte) the second argument. |
target | target('php_version') |
Obtain a variable from the assessed target. See target:metadata for all available variables. |
drupal_module_enabled | drupal_module_enabled('page_cache') |
Returns TRUE if the module is enabled. Otherwise FALSE. |