You are here

public function BlockAddController::blockAddConfigureForm in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/block/src/Controller/BlockAddController.php \Drupal\block\Controller\BlockAddController::blockAddConfigureForm()

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 'BlockAddController::blockAddConfigureForm'
block.routing.yml in core/modules/block/block.routing.yml
core/modules/block/block.routing.yml

File

core/modules/block/src/Controller/BlockAddController.php, line 28
Contains \Drupal\block\Controller\BlockAddController.

Class

BlockAddController
Controller for building the block instance add form.

Namespace

Drupal\block\Controller

Code

public function blockAddConfigureForm($plugin_id, $theme) {

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