K4:Unit Configuration File
From In-Portal Developers Guide
Path to article:
Line 38: | Line 38: | ||
| {{ConfigProperty|ConfigPriority|int}} || | | {{ConfigProperty|ConfigPriority|int}} || | ||
|- | |- | ||
- | | {{ConfigProperty|PassPriority|int}} || | + | | {{ConfigProperty|PassPriority|int}} || Allows setting the order in which a prefix will be shown amongst other prefixes in putting together the value of an [[K4:Переменная окружения|environment variable]]. Available since [[K4:Core v 5.0.0|Core v 5.0.0]]. |
|- | |- | ||
| [[K4:Hooks|{{ConfigProperty|Hooks|array}}]] || Allows adding new hooks to the system. | | [[K4:Hooks|{{ConfigProperty|Hooks|array}}]] || Allows adding new hooks to the system. | ||
Line 52: | Line 52: | ||
| {{ConfigProperty|IDField|string}} || Name of the column in the table that holds the primary key. This is usually an integer column using autoincrement. | | {{ConfigProperty|IDField|string}} || Name of the column in the table that holds the primary key. This is usually an integer column using autoincrement. | ||
|- | |- | ||
- | | {{ConfigProperty|StatusField|array}} || | + | | {{ConfigProperty|StatusField|array}} || List of columns in a table (usually there's only one, for example '''<code>Array ('Status')</code>''' or '''<code>Array ('Enabled')</code>''') that affect the icon in each record in an In-Portal grid. The value of this option is also used in Events [[EventHandler:OnMassApprove|OnMassApprove]] and [[EventHandler:OnMassDecline|OnMassDecline]]. |
|- | |- | ||
- | | {{ConfigProperty|OrderField|string}} || | + | | {{ConfigProperty|OrderField|string}} || The name of the field that's used in Events [[EventHandler:OnMassMoveUp|OnMassMoveUp]] and [[EventHandler:OnMassMoveDown|OnMassMoveDown]] to change the order in which records are displayed in a grid. If the option isn't set, by default its value will be "<code>Priority</code>". |
|- | |- | ||
| {{ConfigProperty|TitleField|string}} || Название колонки в таблице, содержание которой будет использовано в заголовке формы редактирования этого item. Используется в опции [[#TitlePresets|TitlePresets]]. | | {{ConfigProperty|TitleField|string}} || Название колонки в таблице, содержание которой будет использовано в заголовке формы редактирования этого item. Используется в опции [[#TitlePresets|TitlePresets]]. |
Revision as of 23:41, 8 November 2010
This article is not finished yet! You see this message because current Article is finished yet or contains unverified information. How to write an Article. |
| ||
---|---|---|
Статьи в этой категории | ||
$config
). The value of each option can be type available доступного in PHP. The options can be interconnected with one another and their connections can't be determined by analyzing just the unit config file. This is better done by searching the names of these options in the PHP code of K4.
All Standard Options
Option Names | Option Descriptions |
---|---|
Prefix (string) | The prefix of this unit config (must be unique amongst all unit configs). The contents of this option must follow naming conventions rules. |
ItemClass (Array) | Registers in the system a connection between a prefix and class for working with the one record in the database. |
ListClass (Array) | Registers the connection between a prefix and class in the system for the purposes of displaying the contents of a table in the database (filtering, per-page, etc.). |
EventHandlerClass (Array) | Registers in the system the connection between a prefix and class for the purpose of processing standard events from grids and edit forms. |
TagProcessorClass (Array) | Registers a connection in the system between a prefix and class for processing standard tags, used for displaying information. |
RegisterClasses (Array) | Registers any user classes in the system. |
AutoLoad (boolean) | Automatically loads an item object by ID, which is found in $_REQUEST .
|
CheckSimulatniousEdit (boolean) | Indicates that there must be a check for dual editing for the table that's declared in the configuration file. The check works in the following way: If one user opens a record for edit, which is already being edited by another user, then the user will be shown a warning that the record he or she has opened is already being edited by another user. The warning will show the user's name and IP address. Available since Core v 5.0.0. |
QueryString (array) | |
RegularEvents (array) | Executes the indicated events at the required interval. |
PortalStyleEnv (bool) | Controls how a prefix's variable will look in an environment variable. If set to "true ", then there won't be a hyphen between the prefix and the value of its first variable, i.e. it will be "m5 ", instead of "m-5 " as usual.
|
CatalogItem (bool) | |
AdminTemplatePath (string) | |
AdminTemplatePrefix (string) | |
SearchConfigPostfix (string) | |
ConfigPriority (int) | |
PassPriority (int) | Allows setting the order in which a prefix will be shown amongst other prefixes in putting together the value of an environment variable. Available since Core v 5.0.0. |
Hooks (array) | Allows adding new hooks to the system. |
ItemType (int) | |
ViewMenuPhrase (string) | |
ItemPropertyMappings (array) | |
TitlePhrase (string) | |
IDField (string) | Name of the column in the table that holds the primary key. This is usually an integer column using autoincrement. |
StatusField (array) | List of columns in a table (usually there's only one, for example Array ('Status') or Array ('Enabled') ) that affect the icon in each record in an In-Portal grid. The value of this option is also used in Events OnMassApprove and OnMassDecline.
|
OrderField (string) | The name of the field that's used in Events OnMassMoveUp and OnMassMoveDown to change the order in which records are displayed in a grid. If the option isn't set, by default its value will be "Priority ".
|
TitleField (string) | Название колонки в таблице, содержание которой будет использовано в заголовке формы редактирования этого item. Используется в опции TitlePresets. |
TableName (string) | Название таблицы в базе данных для которой будет использоваться данный unit config, напр. TABLE_PREFIX.'Tests' .
|
SubItems (array) | |
TitlePresets (array) | Набор заголовков над grid и формами редактирования (текст на синем фоне), напр. "Editing Order 000554-002 - General", "Orders (5 of 17)". |
EditTabPresets (array) | |
PermItemPrefix (string) | |
PermTabText (string) | |
PermSection (array) | Название секции (в дереве секций в левом frame), которая отвечает за проверку прав доступа к этому unit config, напр. Array('main' => 'custom:tests') .
|
Sections (array) | Набор секций в дереве из левого frame в административной консоли. |
FilterMenu (array) | |
PopulateMlFields (boolean) | Указывает на то, должны ли сохраняться значения переводимых полей (напр. пришедших с формы) на языках, отличных от текущего. |
ListSQLs (array) | |
ListSortings (array) | |
ItemSQLs (array) | |
CalculatedFields (array) | Вычисляемые поля в grid/item. |
Fields (array) | Описание полей из таблицы в базе данных (тип данных, форматер и т. п.). |
VirtualFields (array) | По структуре это такой же массив, как и в опции Fields. Единственное отличие в том, что значения этих полей не будут сохранены в базе данных. |
Grids (array) | |
ConfigMapping (array) |