All Projects → mglaman → drupal-typed-data-by-example

mglaman / drupal-typed-data-by-example

Licence: GPL-3.0 license
Drupal's Typed Data API by example

Programming Languages

PHP
23972 projects - #3 most used programming language

Labels

Projects that are alternatives of or similar to drupal-typed-data-by-example

dblog-ui
No description or website provided.
Stars: ✭ 22 (-18.52%)
Mutual labels:  drupal
drupal-elm-starter
DEPRECATED - See https://github.com/Gizra/drupal-starter
Stars: ✭ 33 (+22.22%)
Mutual labels:  drupal
joinup-dev
The Joinup project moved to https://git.fpfis.eu/ec-europa/digit-joinup-reference
Stars: ✭ 41 (+51.85%)
Mutual labels:  drupal
DrupalTwigFood
Useful functions, filters for twig @ Drupal 8
Stars: ✭ 1 (-96.3%)
Mutual labels:  drupal
distros.bid
A saas to create drupal websites in seconds using docker containers.
Stars: ✭ 16 (-40.74%)
Mutual labels:  drupal
ansible-role-drupal
Ansible Role - Drupal
Stars: ✭ 80 (+196.3%)
Mutual labels:  drupal
apigee-devportal-kickstart-drupal
A fast demo and starting point for Apigee Developer Portals for Drupal
Stars: ✭ 21 (-22.22%)
Mutual labels:  drupal
buzzyblog
React + WordPress REST API, a new endeavor to provide a better experience to content creators, web masters and digital marketers, etc
Stars: ✭ 50 (+85.19%)
Mutual labels:  drupal
fabalicious
is now deprecated and not supported anymore, use https://github.com/factorial-io/phabalicious instead
Stars: ✭ 14 (-48.15%)
Mutual labels:  drupal
ding2
Ding install profile
Stars: ✭ 17 (-37.04%)
Mutual labels:  drupal
drupal-tweme
Ultra lightweight Bootstrap theme for Drupal.
Stars: ✭ 62 (+129.63%)
Mutual labels:  drupal
WebsiteMixer-App-Base
Python/Flask alternative to Wordpress and Drupal
Stars: ✭ 18 (-33.33%)
Mutual labels:  drupal
thunder-distribution
A Drupal-based platform for professional publishers
Stars: ✭ 31 (+14.81%)
Mutual labels:  drupal
drupal-react-image-gallery
Drupal 8 module that provides a dynamic Image Gallery based on the react-image-gallery component.
Stars: ✭ 13 (-51.85%)
Mutual labels:  drupal
boilerplate-drupal8
[ARCHIVED] Drupal 8 boilerplate project powered by Docksal
Stars: ✭ 66 (+144.44%)
Mutual labels:  drupal
drupal-template-helper
Debug Drupal 8 templates in Chrome Devtools. drupal-template-helper is a chrome extension for Drupal that lists all available templates and the preprocess hooks to use to customize your templates.
Stars: ✭ 115 (+325.93%)
Mutual labels:  drupal
expresso-php
Fast and simple Docker setup for all your PHP development. Quick but not dirty.
Stars: ✭ 31 (+14.81%)
Mutual labels:  drupal
drupal8-composer-template
Project template for Drupal 8 projects with composer | Quick installation via "composer create-project woprrr/drupal8-composer-template:8.3.0"
Stars: ✭ 27 (+0%)
Mutual labels:  drupal
ansible-role-php-versions
Ansible Role - PHP Versions
Stars: ✭ 78 (+188.89%)
Mutual labels:  drupal
awesome-drupal
A curated list of amazingly awesome Drupal open source, resources and shiny things.
Stars: ✭ 106 (+292.59%)
Mutual labels:  drupal

Drupal's Typed Data API by example

This repository aims to help show use cases and various exercises with using Drupal's Typed Data API.

The Typed Data API was created to provide developers with a consistent way of interacting with data in different ways.

Purpose

This repository provides examples of using the Typed Data API. The examples range from generic usage explaining the different data types available, to creating complex data definitions, to utilizing them in real world Drupal applications.

The intent is not to run this code in your Drupal site, but to browse the code examples.

Structure

The examples are broken into different groups, each with their own directory:

  • primitives: each example covers the data types provided by Drupal core. These are intended to be simplistic examples of using a value and wrapping it in Typed Data data types for validation and representation.
  • lists: each example covers using lists (arrays of a specific type)
  • maps: each example covers using the Map data type, which allows you to define complex data definitions to describe an object's shape.
  • serialization: each example shows how the Typed Data API integrates with Drupal's Serialization module, which leverages the Serializer component from Symfony.

Trying it out!

All of the examples can be run to see sample outputs.

First, install the dependencies and generate the autoloader (requires PHP ^8.0):

composer install

For example, the following will run the emails example in primitives/ and print any of the additional output provided for context.

php primitives/email.php
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].