Views Add Button: A Case Study for D8 Annotation-based Plugins
One of the basic-yet-powerful features of Drupal is the ability to create and manage lists of content with the Views module. Yet, the ability to generate an "add an entity" button has been a long-standing challenge: how do you make an add button that handles contextual filters, one or more parameters needed for a route context, and access control?
Typically, this problem is handled with custom modules or placing a view within a view, but Views Add Button (VAB) allows site builders to create add buttons without additional coding or views-in-views, and also permits module developers to register their custom entities with VAB. In this talk Mike Nolan will demonstrate how VAB effectively uses annotation-based plugins to register custom entities with VAB, so that developers can create a seamless user experience for site builders and end users, and promote effective content management.
Finally, Mike will also show how VAB is a case study for the annotation-based plugin system, and how Cerium Software has been developing the plugin system to meet a growing number of use cases.
Who this session is for
This session is for site builders with basic familiarity with Drupal Views, and for D8 module developers who work with custom entities.
Site builders will learn about the Views Add Button module and how to use it for both frontend and backend user experiences. They will also learn about how VAB can work with Views contextual filters and the Prepopulate module for creating personalized or context-aware add buttons.
Developers will learn about the basics of the Annotation system, and how to create a VAB plugin for their custom entity.
What we will cover
The session will begin with an introduction to VAB and the custom module that led to its development, followed by an explanation of how VAB is used in Views. We will then move to a discussion of Drupal 8's annotation system, how VAB's annotation-based plugins work, and how module developers may write a VAB plugin. Views Add Button: Group will be used as an example.