You are here

public static function EntityUpdateTestHelper::fieldEnable in Entity Update 8

Same name and namespace in other branches
  1. 2.0.x tests/modules/entity_update_tests/src/EntityUpdateTestHelper.php \Drupal\entity_update_tests\EntityUpdateTestHelper::fieldEnable()

Enable a configurable field.

10 calls to EntityUpdateTestHelper::fieldEnable()
EntityUpdateFunctionsTest::testEntityUpdateAdvanced in modules/entity_update_tests/src/Tests/EntityUpdateFunctionsTest.php
Entity advanced update simulation.
EntityUpdateFunctionsTest::testEntityUpdateAll in modules/entity_update_tests/src/Tests/EntityUpdateFunctionsTest.php
Entity update function : all.
EntityUpdateFunctionsTest::testEntityUpdateBasic in modules/entity_update_tests/src/Tests/EntityUpdateFunctionsTest.php
Entity update function : basic.
EntityUpdateFunctionsTest::testEntityUpdateBasicForce in modules/entity_update_tests/src/Tests/EntityUpdateFunctionsTest.php
Entity update function : basic --force.
EntityUpdateFunctionsTest::testEntityUpdateClean in modules/entity_update_tests/src/Tests/EntityUpdateFunctionsTest.php
Entity update function : clean.

... See full list

File

modules/entity_update_tests/src/EntityUpdateTestHelper.php, line 41

Class

EntityUpdateTestHelper
EntityUpdateTest Helper functions.

Namespace

Drupal\entity_update_tests

Code

public static function fieldEnable($name, $enable = TRUE) {
  $config = self::getConfig(TRUE);
  $config
    ->set("fields." . $name, $enable);
  $config
    ->save();
}