You are here

public function AddAnotherController::addAnotherGoTo in Add Another 8

Takes the user to the node creation page for the type of a given node.

1 string reference to 'AddAnotherController::addAnotherGoTo'
addanother.routing.yml in ./addanother.routing.yml
addanother.routing.yml

File

src/Controller/AddAnotherController.php, line 17

Class

AddAnotherController
Controller routines for Add another routes.

Namespace

Drupal\addanother\Controller

Code

public function addAnotherGoTo(NodeInterface $node) {
  return $this
    ->redirect('node.add', [
    'node_type' => $node
      ->getType(),
  ]);
}