Skip to content
This repository has been archived by the owner on Dec 10, 2020. It is now read-only.

Components

Leonid Medovyy edited this page Sep 27, 2019 · 8 revisions

Components are the building blocks of the application. They are defined under the components: namespace in the configuration files.

The components are used for access control by the permissions system. In the following example, a basic component called dashboard is created. It is now possible to control who has access to this component via Permissions System

components:
  dashboard:
    path: 'dashboard'
    enabled: true

Convention

  • Component names can be either singular or plural.
  • Class names are uppercase and include the :: separator for the namespace
  • Views are based on the class name. They are lowercase and the :: separator is replaced by the underscore.

Adding Entry

  • app\models\entries[Singular Component Name]

Enabling Component

Disabling Component

Autoloadable

  • The auto-loadable utilizes the class name to find a component. Therefore it is important that the components have the same name as a class.
  • Components, with namespaces, such as elements are turned into elements_component name.
Clone this wiki locally