You are here

public function PageUrlQrCodeBlock::defaultConfiguration in Page URL QR Code Block 8

Gets default configuration for this plugin.

Return value

array An associative array with the default configuration.

Overrides BlockPluginTrait::defaultConfiguration

File

src/Plugin/Block/PageUrlQrCodeBlock.php, line 42
Contains \Drupal\page_url_qr_code_block\Plugin\Block\page_url_qr_code_block.

Class

PageUrlQrCodeBlock
Provides my custom block.

Namespace

Drupal\page_url_qr_code_block\Plugin\Block

Code

public function defaultConfiguration() {
  $default_config = \Drupal::config('page_url_qr_code_block.settings');
  return array(
    'page_url_qr_code_caption' => $default_config
      ->get('page_url_qr_code_block.page_url_qr_code_caption'),
    'page_url_qr_code_alt' => $default_config
      ->get('page_url_qr_code_block.page_url_qr_code_alt'),
    'page_url_qr_code_width_height' => $default_config
      ->get('page_url_qr_code_block.page_url_qr_code_width_height'),
    'page_url_qr_code_api' => $default_config
      ->get('page_url_qr_code_block.page_url_qr_code_api'),
  );
}