Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
Drupal 8 Third Party Settings and Pseudo-Fields
Sep 15, 2015 @ 17:25:45

The SitePoint PHP blog continues their series looking at Drupal 8 with this new article from Daniel Sipos about third-party settings and pseudo-fields. Part one of the series can be found here

In the first installment of this series we started our journey towards creating some simple but powerful functionality. The goal we set was to have the possibility to load a form on each node page and to be able to choose which form type should be used on the different node bundles. [...] It follows to see how we can configure the core node types to use one of the plugins defined on the site and how to render the relevant form when viewing the node. But first, in order to have something to work with, let’s create our first ReusableForm plugin that uses a very simple form.

He starts back in with the creation of a first simple plugin to handle the form created in the previous part of the series, assigning the form to it via annotations. He then configures the node entities to be able to use the plugin via the services YAML configuration file. He then updates the .module with a function for altering node details and an entity builder. He updates the schema definition to be able to show the form and, finally, render the form out to the view with the assigned node entity types.

tagged: drupal8 series part2 thirdparty settings pseudofields form tutorial

Link: http://www.sitepoint.com/drupal-8-third-party-settings-and-pseudo-fields/


Trending Topics: