You are here

public function BackgroundImageBlock::buildConfigurationForm in Background Image 8

Same name and namespace in other branches
  1. 2.x src/Plugin/Block/BackgroundImageBlock.php \Drupal\background_image\Plugin\Block\BackgroundImageBlock::buildConfigurationForm()
  2. 2.0.x src/Plugin/Block/BackgroundImageBlock.php \Drupal\background_image\Plugin\Block\BackgroundImageBlock::buildConfigurationForm()

Creates a generic configuration form for all block types. Individual block plugins can add elements to this form by overriding BlockBase::blockForm(). Most block plugins should not override this method unless they need to alter the generic form elements.

Overrides BlockPluginTrait::buildConfigurationForm

See also

\Drupal\Core\Block\BlockBase::blockForm()

File

src/Plugin/Block/BackgroundImageBlock.php, line 43

Class

BackgroundImageBlock
Plugin annotation @Block( id = "background_image", admin_label = @Translation("Background Image"), category = @Translation("Background Image") )

Namespace

Drupal\background_image\Plugin\Block

Code

public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
  $form = parent::buildConfigurationForm($form, $form_state);
  $form['label_display']['#access'] = FALSE;
  return $form;
}