Book Image

Drupal 8 Configuration Management

Book Image

Drupal 8 Configuration Management

Overview of this book

Table of Contents (16 chapters)
Drupal 8 Configuration Management
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Preface
Index

Data types


Most of the basic types, as well as some more complex types, are defined in the core.data_types.schema.yml file:

# Basic scalar data types from typed data.
boolean:
  label: 'Boolean'
  class: '\Drupal\Core\TypedData\Plugin\DataType\Boolean'
email:
  label: 'Email'
  class: '\Drupal\Core\TypedData\Plugin\DataType\Email'
integer:
  label: 'Integer'
  class: '\Drupal\Core\TypedData\Plugin\DataType\Integer'
float:
  label: 'Float'
  class: '\Drupal\Core\TypedData\Plugin\DataType\Float'
string:
  label: 'String'
  class: '\Drupal\Core\TypedData\Plugin\DataType\String'
uri:
  label: 'Uri'
  class: '\Drupal\Core\TypedData\Plugin\DataType\Uri'

These types have a direct mapping to their Typed Data API counterparts. The Typed Data API has been created to provide developers with a consistent way to interact with data. By default, PHP is a very loosely-typed language. The Typed Data API is trying to fix this, so Drupal itself—or any another system on which you would like to expose your data...