public function OrgAddController::addForm in RedHen CRM 8
Presents the creation form for redhen_org entities of given bundle/type.
Parameters
\Drupal\Core\Entity\EntityInterface $redhen_org_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 OrgAddController::addForm()
- OrgAddController::add in modules/
redhen_org/ src/ Controller/ OrgAddController.php - Displays add links for available bundles/types for entity redhen_org .
File
- modules/
redhen_org/ src/ Controller/ OrgAddController.php, line 75
Class
- OrgAddController
- Class OrgAddController.
Namespace
Drupal\redhen_org\ControllerCode
public function addForm(EntityInterface $redhen_org_type, Request $request) {
$entity = $this->storage
->create([
'type' => $redhen_org_type
->id(),
]);
return $this
->entityFormBuilder()
->getForm($entity);
}