You are here

public function FormEntityContext::getContextValue in Flexiform 8

Gets the context value.

Return value

mixed The currently set context value, or NULL if it is not set.

Overrides Context::getContextValue

1 call to FormEntityContext::getContextValue()
FormEntityContext::hasContextValue in src/FormEntity/FormEntityContext.php
Returns whether the context has a value.

File

src/FormEntity/FormEntityContext.php, line 71

Class

FormEntityContext
Class for form entity contexts.

Namespace

Drupal\flexiform\FormEntity

Code

public function getContextValue() {
  if (!$this->contextData) {
    $this
      ->setContextValue($this
      ->getFormEntity()
      ->getEntity());
  }
  return parent::getContextValue();
}