public function HomeboxController::add in Homebox 8
Provides the reference submission form.
Parameters
\Drupal\homebox\Entity\HomeboxInterface $homebox: The homebox.
Return value
array A homebox layout submission form.
Throws
\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
\Drupal\Component\Plugin\Exception\PluginNotFoundException
1 string reference to 'HomeboxController::add'
File
- src/
Controller/ HomeboxController.php, line 56
Class
- HomeboxController
- Class HomeboxController.
Namespace
Drupal\homebox\ControllerCode
public function add(HomeboxInterface $homebox) {
$entity = $this
->entityTypeManager()
->getStorage('homebox_layout')
->create([
'type' => $homebox
->id(),
]);
return $this
->entityFormBuilder()
->getForm($entity);
}