Sign in Registration
ruen

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

Popular sections

Eqsash (Tools)

Android app - VK LAST USER ID, отучитель от зависимости и т.д.:
Available on Google Play

Amessage (Communication)

Login to the web version
Android app:
Available on Google Play

Share this

Subscribe to

YouTube

Books

IT notes - In simple language about the most necessary things (HTML, CSS, JavaScript, PHP, databases, Drupal, Bitrix, SEO, domains, security and more), PDF, 500 p.