public function Php::summary in PHP 8
Provides a human readable summary of the condition's configuration.
Overrides ConditionInterface::summary
File
- src/
Plugin/ Condition/ Php.php, line 54
Class
- Php
- Provides a 'Php' condition.
Namespace
Drupal\php\Plugin\ConditionCode
public function summary() {
if (!empty($this->configuration['php'])) {
return t('When the given PHP evaluates as @state.', [
'@state' => !empty($this->configuration['negate']) ? 'FALSE' : 'TRUE',
]);
}
else {
return t('No PHP code has been provided.');
}
}