function BooleanData::getCastedValue

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/TypedData/Plugin/DataType/BooleanData.php \Drupal\Core\TypedData\Plugin\DataType\BooleanData::getCastedValue()
  2. 8.9.x core/lib/Drupal/Core/TypedData/Plugin/DataType/BooleanData.php \Drupal\Core\TypedData\Plugin\DataType\BooleanData::getCastedValue()
  3. 10 core/lib/Drupal/Core/TypedData/Plugin/DataType/BooleanData.php \Drupal\Core\TypedData\Plugin\DataType\BooleanData::getCastedValue()

Overrides PrimitiveInterface::getCastedValue

File

core/lib/Drupal/Core/TypedData/Plugin/DataType/BooleanData.php, line 25

Class

BooleanData
The boolean data type.

Namespace

Drupal\Core\TypedData\Plugin\DataType

Code

public function getCastedValue() {
    return (bool) $this->value;
}

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