function BaseFieldOverrideTest::defaultValueCallbackPrimitive

Same name in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Field/Entity/BaseFieldOverrideTest.php \Drupal\KernelTests\Core\Field\Entity\BaseFieldOverrideTest::defaultValueCallbackPrimitive()
  2. 8.9.x core/tests/Drupal/KernelTests/Core/Field/Entity/BaseFieldOverrideTest.php \Drupal\KernelTests\Core\Field\Entity\BaseFieldOverrideTest::defaultValueCallbackPrimitive()
  3. 11.x core/tests/Drupal/KernelTests/Core/Field/Entity/BaseFieldOverrideTest.php \Drupal\KernelTests\Core\Field\Entity\BaseFieldOverrideTest::defaultValueCallbackPrimitive()

A default value callback which returns a primitive value.

Return value

int A primitive default value.

File

core/tests/Drupal/KernelTests/Core/Field/Entity/BaseFieldOverrideTest.php, line 123

Class

BaseFieldOverrideTest
@coversDefaultClass \Drupal\Core\Field\Entity\BaseFieldOverride @group Field

Namespace

Drupal\KernelTests\Core\Field\Entity

Code

public static function defaultValueCallbackPrimitive() {
    return 99;
}

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