Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Mosaik Layouts definition is as simple as hook_theme implementation.
To define a layout we have to implement hook_mosaik_layout($path).
See example below:
If your are a developer and you want to add or alter the default piece callback types, you can do it implementing hook_pieces_callbacks_alter(&$callbacks) as you can see from the pieces_callbacks() function:
In this section we will analyze the flow of execution provided by the submodule patterns_export, that allows us to extract Patterns files automatically. For this example we will be using the color component.
A new entry in the menu is set by hook_menu_alter(). The function called when accessing to the url is patterns_export(), which will check if there are any parsers available and call the function patterns_export_page1() after loading all the components.
The function patterns_export_page1() will take care of:
Invoke all the modules implementing patterns, and filter those which provide any export function.
Prepare the form with the granularity options to export for each of these components (i.e.: the taxonomy component allows to export terms and/or vocabularies).
The purpose of this document is offering a starting point for contributors and developers to understand patterns code. The tour's aim is to provide an outer to inner overview, in a similar way we do while debugging the code.