Database and Constants
Inspecting the hook_schema() in the file patterns.install in order to have an overview of how patterns are stored in the database can be a good starting point.
Patterns are stored in a serialized array whose field is called "pattern". They have an unique serial identifier (field "pid"), and a set of metadata to indicate the state of the pattern ("status", "public", "updated", etc.), dates when was enabled or last updated, etc.
Patterns also implements the hook_requirements() in patterns.install, where the module will check if the filesystem is writable, if certain PHP variables are set in order to allow patterns to be remotely imported, etc.
After that we can revise the file in which global variables and constants are stored: includes/variables.inc. This file includes important constants like the ones that define the different types of actions (PATTERNS_CREATE, PATTERNS_MODIFY, …), those employed for the different status (PATTERNS_STATUS_OK, PATTERNS_STATUS_ENABLED, …), the default directory to store the patterns (PATTERNS_FILES_DIR_DEFAULT), etc.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion