You are here

public function ContextManager::getForm in Context 8.4

Same name and namespace in other branches
  1. 8 src/ContextManager.php \Drupal\context\ContextManager::getForm()
  2. 8.0 src/ContextManager.php \Drupal\context\ContextManager::getForm()

Get a rendered form for the context.

Parameters

\Drupal\context\ContextInterface $context: The entity to be created or edited.

string $formType: The operation identifying the form variation to be returned.

array $form_state_additions: An associative array used to build the current state of the form.

Return value

array The processed form for the given entity and operation.

File

src/ContextManager.php, line 400

Class

ContextManager
This is the manager service for the context module.

Namespace

Drupal\context

Code

public function getForm(ContextInterface $context, $formType = 'edit', array $form_state_additions = []) {
  return $this->entityFormBuilder
    ->getForm($context, $formType, $form_state_additions);
}