You are here

public function ContextFormBase::contextExists in Context 8

Same name and namespace in other branches
  1. 8.4 modules/context_ui/src/Form/ContextFormBase.php \Drupal\context_ui\Form\ContextFormBase::contextExists()
  2. 8.0 modules/context_ui/src/Form/ContextFormBase.php \Drupal\context_ui\Form\ContextFormBase::contextExists()

Check to see if a context already exists with the specified name.

Parameters

string $name: The machine name to check for.

Return value

bool

File

modules/context_ui/src/Form/ContextFormBase.php, line 227

Class

ContextFormBase

Namespace

Drupal\context_ui\Form

Code

public function contextExists($name) {
  return $this->contextManager
    ->contextExists($name);
}