Skip to content

Latest commit

 

History

History
44 lines (31 loc) · 1.96 KB

creating_a_point2d_field_type.md

File metadata and controls

44 lines (31 loc) · 1.96 KB
description
Go through a Field Type tutorial to learn how to create a custom Field Type based on the built-in Generic Field Type.

Creating a Point 2D Field Type

This tutorial covers the creation and development of a custom [[= product_name =]] Field Type. The Generic Field Type is a very powerful extension point. It enables you to easily build complex solutions on a ready-to-go Field Type template.

Field Types are responsible for:

  • Storing data, either using the native storage engine mechanisms or specific means
  • Validating input data
  • Making the data searchable (if applicable)
  • Displaying Fields

You can find more information in Field Type documentation. It describes how each component of a Field Type interacts with the various layers of the system, and how to implement them.

Intended audience

This tutorial is aimed at developers who are familiar with [[= product_name =]] and are comfortable with operating in PHP and Symfony.

Content of the tutorial

This tutorial will show you how to use the Generic Field Type as a template for a custom Field Type. You will:

  • Create a custom Point 2D Field Type with two coordinates as input, e.g. (4,5)
  • Register the new Field Type as a service and define its template
  • Add basic validation to your Point 2D
  • Add data migration to the Field Type so you will be able to easily change its output

Steps

In this tutorial you will go through the following steps: