You are here

public function DashboardBlock::blockValidate in Dashboards with Layout Builder 2.0.x

Same name and namespace in other branches
  1. 8 src/Plugin/Block/DashboardBlock.php \Drupal\dashboards\Plugin\Block\DashboardBlock::blockValidate()

Adds block type-specific validation for the block form.

Note that this method takes the form structure and form state for the full block configuration form as arguments, not just the elements defined in BlockPluginInterface::blockForm().

Parameters

array $form: The form definition array for the full block configuration form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Overrides BlockPluginTrait::blockValidate

See also

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

\Drupal\Core\Block\BlockPluginInterface::blockSubmit()

File

src/Plugin/Block/DashboardBlock.php, line 60

Class

DashboardBlock
Provides a dashboard block.

Namespace

Drupal\dashboards\Plugin\Block

Code

public function blockValidate($form, FormStateInterface $form_state) {
  $this->basePlugin
    ->validateForm($form, $form_state, $this
    ->getConfiguration());
}