Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 3 |
| BlockAddController | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 3 |
| blockAddConfigureForm | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 3 |
|||
| <?php | |
| /** | |
| * @file | |
| * Contains \Drupal\block\Controller\BlockAddController. | |
| */ | |
| namespace Drupal\block\Controller; | |
| use Drupal\Core\Controller\ControllerBase; | |
| /** | |
| * Controller for building the block instance add form. | |
| */ | |
| class BlockAddController extends ControllerBase { | |
| /** | |
| * Build the block instance add form. | |
| * | |
| * @param string $plugin_id | |
| * The plugin ID for the block instance. | |
| * @param string $theme | |
| * The name of the theme for the block instance. | |
| * | |
| * @return array | |
| * The block instance edit form. | |
| */ | |
| 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); | |
| } | |
| } |