You are here

public static function ComputedPhpFormatterPhp::defaultSettings in Computed Field 8.2

Overrides ComputedStringFormatter::defaultSettings

File

computed_field_php_formatter/src/Plugin/Field/FieldFormatter/ComputedPhpFormatterPhp.php, line 35
Contains \Drupal\Core\Field\Plugin\Field\FieldFormatter\ComputedPhpFormatterPhp.

Class

ComputedPhpFormatterPhp
Plugin implementation of the 'Free PHP' formatter for computed fields.

Namespace

Drupal\computed_field_php_formatter\Plugin\Field\FieldFormatter

Code

public static function defaultSettings() {
  return [
    'php_code' => '$display_value = \'<b>PHP:</b> $value = \' . $value_escaped;',
  ] + parent::defaultSettings();
}