You are here

function _block_form_alter_block_plugin_form_alter_invoke in Block Form Alter 8

Helper function to alter forms for block plugins.

Block forms for the 'block_content' and 'inline_content' plugins must use _block_form_alter_block_type_form_alter_invoke().

Parameters

array $form: Nested array of form elements that comprise the form.

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

string $plugin: The machine name of the plugin implementing the block.

1 call to _block_form_alter_block_plugin_form_alter_invoke()
block_form_alter_form_alter in ./block_form_alter.module
Implements hook_form_alter().

File

./block_form_alter.module, line 117
This module provides block form alter functions.

Code

function _block_form_alter_block_plugin_form_alter_invoke(array &$form, FormStateInterface &$form_state, string $plugin) {
  if ($plugin == 'block_content' || $plugin == 'inline_block') {
    return;
  }
  \Drupal::moduleHandler()
    ->invokeAll('block_plugin_form_alter', [
    &$form,
    &$form_state,
    $plugin,
  ]);
}