You are here

public function AddNodeBlock::blockAddConfigureForm in Quick Node Block 8

Build the block instance add form.

Parameters

string $plugin_id: The plugin ID for the block instance.

string $theme: The name of the theme for the block instance.

Return value

array The block instance edit form.

1 string reference to 'AddNodeBlock::blockAddConfigureForm'
quick_node_block.routing.yml in ./quick_node_block.routing.yml
quick_node_block.routing.yml

File

src/Controller/AddNodeBlock.php, line 23

Class

AddNodeBlock
Controller for building the block instance add form.

Namespace

Drupal\quick_node_block\Controller

Code

public function blockAddConfigureForm($plugin_id = 'quick_node_block', $theme = '') {

  // Create a block entity.
  $entity = $this
    ->entityTypeManager()
    ->getStorage('block')
    ->create([
    'plugin' => $plugin_id,
    'theme' => $theme,
  ]);
  return $this
    ->entityFormBuilder()
    ->getForm($entity);
}