You are here

protected function ConditionAddForm::prepareCondition in Block Visibility Groups 8

Prepares the condition used by this form.

Parameters

string $condition_id: Either a condition ID, or the plugin ID used to create a new condition.

Return value

\Drupal\Core\Condition\ConditionInterface The condition object.

Overrides ConditionFormBase::prepareCondition

File

src/Form/ConditionAddForm.php, line 52

Class

ConditionAddForm
Provides a form for adding a new condition.

Namespace

Drupal\block_visibility_groups\Form

Code

protected function prepareCondition($condition_id) {

  // Create a new condition instance.
  return $this->conditionManager
    ->createInstance($condition_id);
}