I'm creating a new Field Type in Drupal 8. What types can I pass to DataDefinition::create()?


The types are defined as DataType plugins. You could also implement additional ones, but that's not necessary very often, since all the basic scalar data types exist already.

|improve this answer|||||
  • 1
    Ok, thank you.. I'd like to see some better documentation from Drupal, but for now this is fine :) – Andrea Apr 13 '16 at 21:28
  • Yeah - an article with an example use of each type would be super helpful! – Felix Eve Dec 13 '17 at 4:15

Do a file search for @DataType you will find every data type in the system.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.