function TestSelection::setTestMode

Same name in other branches
  1. 9 core/modules/block_content/tests/modules/block_content_test/src/Plugin/EntityReferenceSelection/TestSelection.php \Drupal\block_content_test\Plugin\EntityReferenceSelection\TestSelection::setTestMode()
  2. 8.9.x core/modules/block_content/tests/modules/block_content_test/src/Plugin/EntityReferenceSelection/TestSelection.php \Drupal\block_content_test\Plugin\EntityReferenceSelection\TestSelection::setTestMode()
  3. 11.x core/modules/block_content/tests/modules/block_content_test/src/Plugin/EntityReferenceSelection/TestSelection.php \Drupal\block_content_test\Plugin\EntityReferenceSelection\TestSelection::setTestMode()

Sets the test mode.

Parameters

string $condition_type: The condition type.

bool $is_reusable: Whether to set the condition for reusable or non-reusable blocks.

File

core/modules/block_content/tests/modules/block_content_test/src/Plugin/EntityReferenceSelection/TestSelection.php, line 34

Class

TestSelection
Test EntityReferenceSelection with conditions on the 'reusable' field.

Namespace

Drupal\block_content_test\Plugin\EntityReferenceSelection

Code

public function setTestMode($condition_type = NULL, $is_reusable = NULL) {
    $this->conditionType = $condition_type;
    $this->isReusable = $is_reusable;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.