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

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

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

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



This section contains documentation on how to create component controllers.

Section Contents

General information

Controller titles may contain (lowercase) letters, numbers, and an underscore sign (_) with a letter required at the beginning of the title. You should give the controller a meaningful title reflecting its essence. The title shoud be unique. Take into consideration that if you create a controller to process the events only, it is reasonable to name the controller in a way to avoid future conflicts with an already existing controller (for example, the title of the content type in the content component, though you did not intend to supplement the content type) or if another developer will want to create a component with a similar title but with a properly realized frontend. All controller files are found at: /system/controllers/{controller_title}. A controller can have:

  • only model
  • only public part
  • only control panel
  • process events (hooks), having only public part at the basis
  • all of the above

Public part (frontend)

Component control panel (backend)

Each component can have its own section of settings in the InstantCMS Control panel. The component should have backend (control panel) for you to create such a section. The structure of the component’s control panel is very similar to the frontend’s structure (described in the articles above), but there are some differences.

Automatic Generation

You can use the Component Generator utility to automatically generate the component’s frame and its typical elements (CRUD actions, forms, templates).

Back to Contents

en/dev/controllers.txt · Последние изменения: 02.05.2017 10:51 — murlysja