You are here

public function Php::defaultConfiguration in PHP 8

Gets default configuration for this plugin.

Return value

array An associative array with the default configuration.

Overrides ConditionPluginBase::defaultConfiguration

File

src/Plugin/Condition/Php.php, line 21

Class

Php
Provides a 'Php' condition.

Namespace

Drupal\php\Plugin\Condition

Code

public function defaultConfiguration() {

  // By default the PHP snippet need to return TRUE or blocks will silently
  // disappear after the module has been enabled and/or a block has been
  // configured without configuring a PHP snippet.
  return [
    'php' => '<?php return TRUE; ?>',
  ] + parent::defaultConfiguration();
}