You are here

public function DisclaimerBlock::defaultConfiguration in Disclaimer 8

Overrides BlockPluginTrait::defaultConfiguration

File

src/Plugin/Block/DisclaimerBlock.php, line 86

Class

DisclaimerBlock
Provides a 'DisclaimerBlock' block.

Namespace

Drupal\disclaimer\Plugin\Block

Code

public function defaultConfiguration() {
  return [
    'machine_name' => 'disclaimer_block_' . time(),
    'redirect' => '/',
    'max_age' => 86400,
    'challenge' => [
      'format' => filter_fallback_format(),
      'value' => '',
    ],
    'agree' => $this
      ->t('Yes'),
    'disagree' => $this
      ->t('No'),
    'disclaimer' => [
      'format' => filter_fallback_format(),
      'value' => '',
    ],
  ] + parent::defaultConfiguration();
}