Gy - php framework/CMS | Documentation | Component

<-- table of contents


The components are in the section /gy/component/ , for each component its own section with the name of the component. Components cannot (not recommended) separately run from the browser or connect include without kernel connection gy php framework.

For example component users_all_tables - displays all users in the admin panel gy php framework, its structure:

In component folder (/gy/component/users_all_tables/) may be model.php - it should be a model in understanding MVC
In the component folder (/gy/component/users_all_tables/) may be file lang_controller.php - this is the language file that will be available in the controller

There is a file /gy/component/users_all_tables/componentInfo.php - which contains the description of the component, version, name, description, which fields can be set.(It is needed to display information in the visual page designer) And there is a file /gy/component/users_all_tables/lang_componentInfo.php - in which the phrases for the file /gy/component/users_all_tables/componentInfo.php.

Components can be in a module for example /modules/<название модуля>/component/<название компонента> and in the user section /customDir/component. (In this case, components can have the same name and redefine themselves when called, priority: /customDir/... -> /gy/modules/... ->/gy/component/...)

Component language file example

<? // language file for component template
if ( !defined("GY_CORE") && (GY_CORE !== true) ) die( "gy: err include core" );
$mess['rus'] = array(
 'del-user' => 'удалить'

Example of starting a component template from a file controller.php

$this->template->show($arRes, $this->arParam);

An example of text output from a language file in a component template


View documentation on