public function EntityLazyLoadContext::getContextValue in Page Manager 8.4
Same name and namespace in other branches
- 8 src/Context/EntityLazyLoadContext.php \Drupal\page_manager\Context\EntityLazyLoadContext::getContextValue()
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 EntityLazyLoadContext::getContextValue()
- EntityLazyLoadContext::hasContextValue in src/Context/ EntityLazyLoadContext.php 
- Returns whether the context has a value.
File
- src/Context/ EntityLazyLoadContext.php, line 47 
Class
- EntityLazyLoadContext
- @todo.
Namespace
Drupal\page_manager\ContextCode
public function getContextValue() {
  if (!$this->contextData) {
    $entity_type_id = substr($this->contextDefinition
      ->getDataType(), 7);
    $this
      ->setContextValue($this->entityRepository
      ->loadEntityByUuid($entity_type_id, $this->uuid));
  }
  return parent::getContextValue();
}