Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Building custom field
types
Edi Modrić ( @emodric )
https://github.com/emodric/EzscIpAddressBundle
About me
• Edi Modrić
• Computer engineering masters degree
• Working at Netgen for 6 years
• 5 years of eZ Publish develo...
Agenda
• A little bit of theory
• Coding a simple field type
• Verifying that it works
The code
$ cd /var/www/ezpublish/src/
$ mkdir Netgen && cd Netgen
$ git clone
git://github.com/emodric/Ezsc
IpAddressBundl...
Datatype + public API = field type
• Content class = Content type
• Content object = Content
• Content class attribute = F...
Field type components
• Main field type implementation
• Field type value
• Per storage converters
Field type storage
• Internal storage
• Stores data to ezcontentobject_attribute DB table
• External storage
• Custom data...
What about legacy stack?
• Legacy datatypes are not going anywhere
• No admin interface based on Symfony stack
• To actual...
Field type vs. datatype
• No difference in functionality
• Advantages over datatypes
• Clear separation of concerns
• No P...
Upcoming SlideShare
Loading in …5
×

eZ Publish Summer Camp 2013 - Building custom field types

1,014 views

Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

eZ Publish Summer Camp 2013 - Building custom field types

  1. 1. Building custom field types Edi Modrić ( @emodric ) https://github.com/emodric/EzscIpAddressBundle
  2. 2. About me • Edi Modrić • Computer engineering masters degree • Working at Netgen for 6 years • 5 years of eZ Publish development • Certified eZ Publish developer • eZ Tags maintainer • Collaborated with eZ Systems on eZ Publish 5 kernel • @emodric • edi@netgen.hr
  3. 3. Agenda • A little bit of theory • Coding a simple field type • Verifying that it works
  4. 4. The code $ cd /var/www/ezpublish/src/ $ mkdir Netgen && cd Netgen $ git clone git://github.com/emodric/Ezsc IpAddressBundle.git
  5. 5. Datatype + public API = field type • Content class = Content type • Content object = Content • Content class attribute = Field definition • Content object attribute = Field • Object attribute content = Field value • Datatype = Field type
  6. 6. Field type components • Main field type implementation • Field type value • Per storage converters
  7. 7. Field type storage • Internal storage • Stores data to ezcontentobject_attribute DB table • External storage • Custom database tables • Anything else
  8. 8. What about legacy stack? • Legacy datatypes are not going anywhere • No admin interface based on Symfony stack • To actually use your field type, you WILL need legacy datatype
  9. 9. Field type vs. datatype • No difference in functionality • Advantages over datatypes • Clear separation of concerns • No POST variables • No SQL • No file uploads • More readable and understandable code

×