Module
Table of contents
A module is one of the system entity types and has a specific structure. It is represented by files and subfolders in the module folder - each file has its own extension with a specific purpose.
Let's look at the following extensions and file contents:
- ini - module description (required);
- php - main code (required);
- service - service code (required);
- api - various functionality available for internal and external use, described in more detail in the API section (optional);
- data - data that is easy to change at the right time (optional);
- form - form description (optional);
- css - styles for decorating page elements related to this module (optional);
- js - JavaScript scripts for processing elements on the page that belong to this module (optional);
- boot - boot code (optional);
- migration - data migration, any necessary operations can be described, the launch is carried out from the main class manually (optional);
- settings - settings (optional);
- mysql - code for working with the MySQL database (optional, relevant for the database entity);
- library - utility library (optional).
Subfolders are optional, they can be anything, such as the following:
- js - JavaScript scripts;
- css - styles for decorating page elements;
- libraries - third-party libraries;
- data - any data (eg cache, migration, etc.);
- files - various files (images, etc.);
- others - other;
- templates - templates with tpl extension;
- * - any subfolders for subentities (crypt, symbol, utility, etc.).
Latest articles
- 09.07.22IT / Misc Convert office files DOC, DOCX, DOCM, RTF to DOCX, DOCM, DOC, RTF, PDF, HTML, XML, TXT formats without loss and markup changes
- 07.07.22IT / Safety How to protect PHP, JS, HTML, CSS source code - obfuscation, minification, compression and encryption
- 06.07.22IT / Safety Connection not secure, problem with Lets Encrypt - how to fix expired 09/30/2021 DST Root CA X3, remove it manually and install ISRG Root X1. Example on MS Windows 7
- 08.07.21IT / Misc How to make a free translation for a website without an API, translate documents in Google Translate
- 06.07.21IT / Misc How to make a subscription button on a website, a subscriber base and automatic mailing