public function ScheduledUpdateAddController::addForm in Scheduled Updates 8
Presents the creation form for scheduled_update entities of given bundle/type.
Parameters
EntityInterface $scheduled_update_type: The custom bundle to add.
\Symfony\Component\HttpFoundation\Request $request: The current request object.
Return value
array A form array as expected by drupal_render().
1 call to ScheduledUpdateAddController::addForm()
- ScheduledUpdateAddController::add in src/
Controller/ ScheduledUpdateAddController.php - Displays add links for available bundles/types for entity scheduled_update .
1 string reference to 'ScheduledUpdateAddController::addForm'
File
- src/
Controller/ ScheduledUpdateAddController.php, line 99 - Contains Drupal\scheduled_updates\Controller\ScheduledUpdateAddController.
Class
- ScheduledUpdateAddController
- Class ScheduledUpdateAddController.
Namespace
Drupal\scheduled_updates\ControllerCode
public function addForm(EntityInterface $scheduled_update_type, Request $request) {
$entity = $this->storage
->create(array(
'type' => $scheduled_update_type
->id(),
));
return $this
->entityFormBuilder()
->getForm($entity);
}