Skip to content

Commit d450fb2

Browse files
Update README.md
1 parent c914d89 commit d450fb2

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
1-
In this tutorial, I'll show you how I created a "basic" custom field in Drupal 8. I won't go into detail about [PSR–4](https://drupal.org/node/1971198), [annotations](https://drupal.org/node/1882526) or [plugins](https://drupal.org/node/2087839) or this tutorial will be huge.
1+
[![Donate via PayPal](https://img.shields.io/badge/donate-paypal-87ceeb.svg)](https://www.paypal.com/donate/?hosted_button_id=2L5XM9USTV4K4)
2+
*Please consider supporting this project by making a donation via [PayPal](https://www.paypal.com/donate/?hosted_button_id=2L5XM9USTV4K4)*
3+
4+
## Description
5+
I created a "basic" custom field in Drupal 8. I won't go into detail about [PSR–4](https://drupal.org/node/1971198), [annotations](https://drupal.org/node/1882526) or [plugins](https://drupal.org/node/2087839) or this tutorial will be huge.
26

37
Instead, I'll add links to other websites that explain the concept further.
48

59
That being said, if you're looking for detailed documentation on the Field API in Drupal 8.
610

711
In Drupal 8, fields are not implemented using hooks like they are in Drupal 7. Instead, they are created using Drupal 8's new [Plugin API](https://drupal.org/node/2087839). This means that instead of implementing hooks, we define a class for a widget, formatter and field item. Most Drupal 7 field hooks like `hook_field_schema`, `hook_field_is_empty` and more; are now methods in classes.
812

13+
14+
**Getting started:-**
15+
16+
917
### [](#s-step-1-implement-field-item "Permalink to this headline")Step 1: Implement Field Item
1018

1119
The first bit of work we need to do is define a field item class called `CustomFieldsItem` that extends the `FieldItemBase` class.

0 commit comments

Comments
 (0)