public function ShortcutController::addForm in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/shortcut/src/Controller/ShortcutController.php \Drupal\shortcut\Controller\ShortcutController::addForm()
Returns a form to add a new shortcut to a given set.
Parameters
\Drupal\shortcut\ShortcutSetInterface $shortcut_set: The shortcut set this shortcut will be added to.
Return value
array The shortcut add form.
1 string reference to 'ShortcutController::addForm'
- shortcut.routing.yml in core/
modules/ shortcut/ shortcut.routing.yml - core/modules/shortcut/shortcut.routing.yml
File
- core/
modules/ shortcut/ src/ Controller/ ShortcutController.php, line 28 - Contains \Drupal\shortcut\Controller\ShortcutController.
Class
- ShortcutController
- Provides route responses for taxonomy.module.
Namespace
Drupal\shortcut\ControllerCode
public function addForm(ShortcutSetInterface $shortcut_set) {
$shortcut = $this
->entityManager()
->getStorage('shortcut')
->create(array(
'shortcut_set' => $shortcut_set
->id(),
));
return $this
->entityFormBuilder()
->getForm($shortcut, 'add');
}