function EntityLazyLoadContext::hasContextValue

Same name in other branches
  1. 8.x-3.x src/Context/EntityLazyLoadContext.php \Drupal\ctools\Context\EntityLazyLoadContext::hasContextValue()

Overrides Context::hasContextValue

File

src/Context/EntityLazyLoadContext.php, line 58

Class

EntityLazyLoadContext
Defines context that loads entity on demand.

Namespace

Drupal\ctools\Context

Code

public function hasContextValue() {
    // Ensure that the entity is loaded before checking if it exists.
    if (!$this->contextData) {
        $this->getContextValue();
    }
    return parent::hasContextValue();
}