public function Php::summary

Provides a human readable summary of the condition's configuration.

Overrides ConditionInterface::summary

File

drupal/core/modules/php/lib/Drupal/php/Plugin/Condition/Php.php, line 55
Contains \Drupal\php\Plugin\Condition\Php.

Class

Php
Provides a 'Php' condition.

Namespace

Drupal\php\Plugin\Condition

Code

public function summary() {
  if (!empty($this->configuration['php'])) {
    return t('When the given PHP evaluates as @state.', array(
      '@state' => !empty($this->configuration['negate']) ? 'FALSE' : 'TRUE',
    ));
  }
  else {
    return t('No PHP code has been provided.');
  }
}