public BlockAddController::blockAddConfigureForm($plugin_id, $theme)
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.
File
- core/modules/block/src/Controller/BlockAddController.php, line 23
Class
- BlockAddController
- Controller for building the block instance add form.
Namespace
Drupal\block\Controller
Code
1 2 3 4 5 6 | 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 ); } |
Please login to continue.