protected function ComponentSectionForm::getNextLink in Module Builder 8.3
Get the next entity link after the one for the current form.
Return value
The name of an entity link.
2 calls to ComponentSectionForm::getNextLink()
- ComponentSectionForm::actions in src/
Form/ ComponentSectionForm.php - Returns an array of supported actions for the current entity form.
- ComponentSectionForm::save in src/
Form/ ComponentSectionForm.php - Form submission handler for the 'save' action.
File
- src/
Form/ ComponentSectionForm.php, line 1712
Class
- ComponentSectionForm
- Generic form for entering a section of data for a component.
Namespace
Drupal\module_builder\FormCode
protected function getNextLink() {
// Probably a more elegant way of figuring out where we currently are
// with routes maybe?
$operation = $this
->getOperation();
// Special case for add and edit forms.
if ($operation == 'default' || $operation == 'edit') {
$operation = 'name';
}
$handler_class = $this->entityTypeManager
->getHandler('module_builder_module', 'component_sections');
$form_ops = $handler_class
->getFormOperations();
// Add in the 'name' operation, as the handler doesn't return it.
$form_ops = array_merge([
'name',
], $form_ops);
$index = array_search($operation, $form_ops);
return $form_ops[$index + 1] . '-form';
}