You are here

public function Block::getVisibilityCondition in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/block/src/Entity/Block.php \Drupal\block\Entity\Block::getVisibilityCondition()

Gets a visibility condition plugin instance.

Parameters

string $instance_id: The condition plugin instance ID.

Return value

\Drupal\Core\Condition\ConditionInterface A condition plugin.

Overrides BlockInterface::getVisibilityCondition

File

core/modules/block/src/Entity/Block.php, line 293

Class

Block
Defines a Block configuration entity class.

Namespace

Drupal\block\Entity

Code

public function getVisibilityCondition($instance_id) {
  return $this
    ->getVisibilityConditions()
    ->get($instance_id);
}