You are here

public function ContentItemBlock::buildConfigurationForm in Panopoly Widgets 8.2

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/ContentItemBlock.php, line 155

Class

ContentItemBlock
Block that displays a node.

Namespace

Drupal\panopoly_widgets\Plugin\Block

Code

public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
  $form = parent::buildConfigurationForm($form, $form_state);
  $form['label']['#attributes'] = [
    'class' => [
      'js-panopoly-widgets-content-item-label',
    ],
  ];
  return $form;
}