You are here

public function SimpleAdSenseBlock::blockForm in Simple AdSense 1.0.x

Same name and namespace in other branches
  1. 8.0 src/Plugin/Block/SimpleAdSenseBlock.php \Drupal\simple_adsense\Plugin\Block\SimpleAdSenseBlock::blockForm()

Overrides BlockPluginTrait::blockForm

File

src/Plugin/Block/SimpleAdSenseBlock.php, line 21

Class

SimpleAdSenseBlock
Provides a 'SimpleAdSenseBlock' block.

Namespace

Drupal\simple_adsense\Plugin\Block

Code

public function blockForm($form, FormStateInterface $form_state) {
  $form['slot'] = array(
    '#type' => 'textfield',
    '#title' => $this
      ->t('Ad Unit Id'),
    '#description' => $this
      ->t('Unique Responsive Ad Unit Id. eg: 5556618763'),
    '#default_value' => isset($this->configuration['slot']) ? $this->configuration['slot'] : '',
    '#maxlength' => 64,
    '#size' => 64,
    '#weight' => '10',
  );
  return $form;
}