You are here

public function BackgroundImageTextBlock::buildConfigurationForm in Background Image 8

Same name and namespace in other branches
  1. 2.x src/Plugin/Block/BackgroundImageTextBlock.php \Drupal\background_image\Plugin\Block\BackgroundImageTextBlock::buildConfigurationForm()
  2. 2.0.x src/Plugin/Block/BackgroundImageTextBlock.php \Drupal\background_image\Plugin\Block\BackgroundImageTextBlock::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/BackgroundImageTextBlock.php, line 43

Class

BackgroundImageTextBlock
Plugin annotation @Block( id = "background_image_text", admin_label = @Translation("Background Image - Text"), 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;
}