Документация InstantCMS

для администраторов и разработчиков

Инструменты пользователя

Инструменты сайта


en:dev:controllers:backend:db

Registering a Component in the Database

To make the component have a control panel, register it in the system by adding an entry to the controllers table in the database.

The table contains the following fields:

Field Value Example
title Component's title displayed in the Control panel Guestbook
name Component's system name. Used in the titles of classes, files and folders guestbook
is_enabled Flag (0 or 1) indicating the component is enabled 1
options Textarea that stores an array of the component’s settings in the YAML format. We recommend that you do not edit it manually but copy the automatically generated value, once you implement the Form of Options -
author Component’s author name Ivanov Ivan
url Website of an author or component http://example.com/
version Component version 1.0
is_backend Flag (0 or1) indicating the component has a control panel 1

Up to InstantCMS version 2.4.0, this entry has to be added to the table when installing a component on another site, that is why, when creating a Component Installer, you need to add the corresponding INSERT-request to the install.sql file. In InstantCMS versions starting from 2.4.0, there is no need to write the INSERT request, if your installation package is typified. The engine will add a proper entry itself.


Back to Contents

en/dev/controllers/backend/db.txt · Последнее изменение: 03.05.2017 13:02 — murlysja