You are here

public function ContextManager::getForm in Context 8

Same name and namespace in other branches
  1. 8.4 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:

string $formType:

array $form_state_additions:

Return value

array

File

src/ContextManager.php, line 324

Class

ContextManager
This is the manager service for the context module and should not be confused with the built in contexts in Drupal.

Namespace

Drupal\context

Code

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