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.
In this section we will detail the execution flow using a basic pattern that can be found in the submodule patterns_examples: node.yaml. This file will be used as an example for the rest of the pages as well.
info:
title: Example Article creation
description: Creates an example article node
author: QSCience
version: 1.0
category: Content
core: 7.x
author_website: http://qlectives.eu
actions:
- create:
tag: node
type: article
title: Test Article
body: lorem ipsum ...
We can start taking a look at the hook_menu() in the file patterns.module, where we will find the association between the paths and the main functions: enable a pattern, remove a pattern, publish it, the main settings, etc.
The first function we will detail is patterns_list() (implemented also in patterns.module), since this is the first function to be called. This function returns the main form in
which all the operations related to patterns are performed. In this function, the following operations are carried on: