You are here

public function CopyrightBlock::defaultConfiguration in Copyright Block module 8

Overrides BlockPluginTrait::defaultConfiguration

File

src/Plugin/Block/CopyrightBlock.php, line 127

Class

CopyrightBlock
Adds a copyright block.

Namespace

Drupal\copyright_block\Plugin\Block

Code

public function defaultConfiguration() {
  $default_config = \Drupal::config('copyright_block.settings');
  return [
    'start_year' => date('Y'),
    'separator' => $default_config
      ->get('separator'),
    'text' => [
      'value' => $default_config
        ->get('text.value'),
      'format' => $default_config
        ->get('text.format'),
    ],
  ];
}