Extension Terminology
A document defining and standardizing plugin-related terminology for consistency and clarity across documentation, tutorials and inter-developer communication.
Modules
Magento Module β a logical group β that is, a directory containing blocks, controllers, helpers, models β that are related to a specific business feature
GraphQL Module β a Magento Module that provides a GraphQL interface, or improves an existing one. By convention, its name ends with the GraphQl
suffix (examples: GtmGraphQl
, PayPalGraphQl
)
Scandi Extension β a separate, reusable JavaScript package implementing some frontend features in Scandi. The moduleβs name should be in lower_snake_case
, and may optionally be prefixed with a vendor such as @scandipwa/
(example: @scandipwa/paypal_payments
). Often located under scandipwa/packages
folder or in node_modules
.
Plugins
Namespace β a string identifier associated with each item in the theme allowing it to be plugged into. These identifiers are formatted as paths, and may consist of (1) the name of the module, (2) the component name and file and (3) the name of the item. For example, a valid namespace might be Component/Image/Component
. To assign a namespace to an item, prefix it with a comment: /** @namespace Component/Image/Component **/
.
Extension Plugin File β a file plugging into a theme's functionality by wrapping around some of its functions, classes or their members. An extension can consist of multiple plugins, located in src/plugin
. Plugin filenames must end with .plugin.js
(example: ConfigQuery.plugin.js
).
Plugin Function β a function in an Extension Plugin that modifies the behavior of an item in the original theme by wrapping around it. The function, property or class that it plugs into is referred to as the target function, target property or target class, respectively.
Target Namespace β the namespace a plugin plugs into.
Plugin Configuration Object β the default export of a plugin file; an object specifying the namespaces the plugin targets, and configuring plugin functions for them.
Plugin Target Type β in the plugin configuration object, a string specifying the plugin type. For example, class methods can be plugged into with type member-function
plugins. Class properties can be plugged into with type member-property
plugins
Last updated