<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://docs.instantcms.ru/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://docs.instantcms.ru/feed.php">
        <title>Документация InstantCMS - en:dev:models</title>
        <description>для администраторов и разработчиков</description>
        <link>https://docs.instantcms.ru/</link>
        <image rdf:resource="https://docs.instantcms.ru/_media/wiki/dokuwiki.svg" />
       <dc:date>2026-11-19T02:45:43+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://docs.instantcms.ru/en/dev/models/get?rev=1491290948"/>
                <rdf:li rdf:resource="https://docs.instantcms.ru/en/dev/models/overview?rev=1490793539"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://docs.instantcms.ru/_media/wiki/dokuwiki.svg">
        <title>Документация InstantCMS</title>
        <link>https://docs.instantcms.ru/</link>
        <url>https://docs.instantcms.ru/_media/wiki/dokuwiki.svg</url>
    </image>
    <item rdf:about="https://docs.instantcms.ru/en/dev/models/get?rev=1491290948">
        <dc:format>text/html</dc:format>
        <dc:date>2017-04-04T07:29:08+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Reading Entries</title>
        <link>https://docs.instantcms.ru/en/dev/models/get?rev=1491290948</link>
        <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;reading-entries&quot;&gt;Reading Entries&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
This section considers the &lt;strong&gt;cmsModel&lt;/strong&gt; class methods allowing to extract entries from the database. 
&lt;/p&gt;

&lt;p&gt;
All code examples imply that an action takes place in the model’s context (i.e. inside your model’s &lt;a href=&quot;https://docs.instantcms.ru/en/dev/models/overview#класс-модели&quot; class=&quot;wikilink1&quot; title=&quot;en:dev:models:overview&quot; data-wiki-id=&quot;en:dev:models:overview&quot;&gt;class&lt;/a&gt; inherited from &lt;strong&gt;cmsModel&lt;/strong&gt;).
&lt;/p&gt;

&lt;p&gt;
To fully understand the methods that are described here, you should be familiar with SQL requests.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Reading Entries&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;reading-entries&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;1-426&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit2&quot; id=&quot;one-row&quot;&gt;One Row&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
There are several ways to get a row from the database table, depending on the options for searching a row.
&lt;/p&gt;

&lt;p&gt;
All the methods return an array that contains the received entry’s fields or &lt;em&gt;false&lt;/em&gt;, if an entry is not found.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;One Row&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;one-row&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;427-672&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit3&quot; id=&quot;getting-a-row-by-id&quot;&gt;Getting a row by ID&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;
&lt;pre class=&quot;code php&quot;&gt;getItemById&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$table_name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$id&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$item_callback&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;
&lt;div class=&quot;table sectionedit4&quot;&gt;&lt;table class=&quot;inline&quot;&gt;
	&lt;tr class=&quot;row0&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt;&lt;strong&gt;$table_name&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;col1&quot;&gt;Table title, without prefix&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row1&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt;&lt;strong&gt;$id&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;col1&quot;&gt;The &lt;code&gt;id&lt;/code&gt; field’s value of a target row&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row2&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt;&lt;strong&gt;$item_callback&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;col1&quot;&gt;An anonymous function for processing the result (see the “Row processing” section below)&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;table&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;table&amp;quot;,&amp;quot;secid&amp;quot;:4,&amp;quot;range&amp;quot;:&amp;quot;774-986&amp;quot;} --&gt;
&lt;p&gt;
Example:
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$comment&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;getItemById&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'comments'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$comment_id&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;hr /&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Getting a row by ID&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;getting-a-row-by-id&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:3,&amp;quot;range&amp;quot;:&amp;quot;673-1077&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit5&quot; id=&quot;getting-a-row-by-field-value&quot;&gt;Getting a row by field value&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;
&lt;pre class=&quot;code php&quot;&gt;getItemByField&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$table_name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$field_name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$field_value&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$item_callback&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;
&lt;div class=&quot;table sectionedit6&quot;&gt;&lt;table class=&quot;inline&quot;&gt;
	&lt;tr class=&quot;row0&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt;&lt;strong&gt;$table_name&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;col1&quot;&gt;Table title, without prefix&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row1&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt;&lt;strong&gt;$field_name&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;col1&quot;&gt;Field title on which the row is searched&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row2&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt;&lt;strong&gt;$field_value&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;col1&quot;&gt;Field value in a target row&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row3&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt;&lt;strong&gt;$item_callback&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;col1&quot;&gt;An anonymous function for processing the result (see the «Row processing» section below)&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;table&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;table1&amp;quot;,&amp;quot;secid&amp;quot;:6,&amp;quot;range&amp;quot;:&amp;quot;1213-1474&amp;quot;} --&gt;
&lt;p&gt;
Example:
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$comment&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;getItemByField&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'comments'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'is_deleted'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;hr /&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Getting a row by field value&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;getting-a-row-by-field-value&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:2,&amp;quot;secid&amp;quot;:5,&amp;quot;range&amp;quot;:&amp;quot;1078-1572&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit7&quot; id=&quot;getting-a-row-according-to-filtering-options&quot;&gt;Getting a row according to filtering options&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;
&lt;pre class=&quot;code php&quot;&gt;getItem&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$table_name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$item_callback&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;
&lt;div class=&quot;table sectionedit8&quot;&gt;&lt;table class=&quot;inline&quot;&gt;
	&lt;tr class=&quot;row0&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt;&lt;strong&gt;$table_name&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;col1&quot;&gt;Table title, without prefix&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row1&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt;&lt;strong&gt;$item_callback&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;col1&quot;&gt;An anonymous function for processing the result (see the “Row processing” section below)&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;table&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;table2&amp;quot;,&amp;quot;secid&amp;quot;:8,&amp;quot;range&amp;quot;:&amp;quot;1690-1849&amp;quot;} --&gt;
&lt;p&gt;
The options are set with the help of filters (see the &lt;a href=&quot;https://docs.instantcms.ru/en/dev/models/filters&quot; class=&quot;wikilink2&quot; title=&quot;en:dev:models:filters&quot; rel=&quot;nofollow&quot; data-wiki-id=&quot;en:dev:models:filters&quot;&gt;Filtration&lt;/a&gt; section)
&lt;/p&gt;

&lt;p&gt;
Example:
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$comment&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;me1&quot;&gt;filterEqual&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'is_deleted'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;me1&quot;&gt;filterLike&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'content'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; ‘&lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt;text&lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;')-&amp;gt;
                getItem('&lt;/span&gt;comments&lt;span class=&quot;st_h&quot;&gt;');&lt;/span&gt;&lt;/pre&gt;
&lt;hr /&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Getting a row according to filtering options&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;getting-a-row-according-to-filtering-options&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:4,&amp;quot;secid&amp;quot;:7,&amp;quot;range&amp;quot;:&amp;quot;1573-2143&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit9&quot; id=&quot;set-of-rows&quot;&gt;Set of Rows&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Set of Rows&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;set-of-rows&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:6,&amp;quot;secid&amp;quot;:9,&amp;quot;range&amp;quot;:&amp;quot;2144-2168&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit10&quot; id=&quot;getting-several-rows&quot;&gt;Getting several rows&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
Use the following method to extract several rows from a table (or several joined tables):
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;get&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$table_name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$item_callback&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$key_field&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'id'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;
&lt;div class=&quot;table sectionedit11&quot;&gt;&lt;table class=&quot;inline&quot;&gt;
	&lt;tr class=&quot;row0&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt;&lt;strong&gt;$table_name&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;col1&quot;&gt;Table title, without prefix&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row1&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt;&lt;strong&gt;$item_callback&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;col1&quot;&gt;An anonymous function for processing the result (see the “Row processing” section below)&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row2&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt;&lt;strong&gt;$key_field&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;col1&quot;&gt;A field whose values will be used as keys for an array with results. If you set &lt;em&gt;false&lt;/em&gt;, the array will be enumerated in a simple way, starting from null&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;table&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;table3&amp;quot;,&amp;quot;secid&amp;quot;:11,&amp;quot;range&amp;quot;:&amp;quot;2366-2698&amp;quot;} --&gt;
&lt;p&gt;
Example:
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$all_comments&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'comments'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
In this request, the &lt;strong&gt;$all_comments&lt;/strong&gt; array will contain all rows from the &lt;strong&gt;comments&lt;/strong&gt; table. You can limit the results by options and number. See below
&lt;/p&gt;
&lt;hr /&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Getting several rows&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;getting-several-rows&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:6,&amp;quot;secid&amp;quot;:10,&amp;quot;range&amp;quot;:&amp;quot;2169-2929&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit12&quot; id=&quot;getting-row-count&quot;&gt;Getting row count&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
Before requesting the &lt;strong&gt;get()&lt;/strong&gt; method, you can query the following method to learn how many rows it will return:
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;getCount&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$table_name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$by_field&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'id'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;
&lt;div class=&quot;table sectionedit13&quot;&gt;&lt;table class=&quot;inline&quot;&gt;
	&lt;tr class=&quot;row0&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt;&lt;strong&gt;$table_name&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;col1&quot;&gt;Table title, without prefix&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row1&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt;&lt;strong&gt;$by_field&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;col1&quot;&gt;Which field to count the number of rows by&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;table&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;table4&amp;quot;,&amp;quot;secid&amp;quot;:13,&amp;quot;range&amp;quot;:&amp;quot;3128-3232&amp;quot;} --&gt;
&lt;p&gt;
The method returns the count. 
&lt;/p&gt;

&lt;p&gt;
Example:
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$comments_count&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;getCount&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'comments'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
When counting, all previously set filters are taken into consideration (see the &lt;a href=&quot;https://docs.instantcms.ru/en/dev/models/filters&quot; class=&quot;wikilink2&quot; title=&quot;en:dev:models:filters&quot; rel=&quot;nofollow&quot; data-wiki-id=&quot;en:dev:models:filters&quot;&gt;Filtration&lt;/a&gt; section).
&lt;/p&gt;
&lt;hr /&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Getting row count&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;getting-row-count&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:8,&amp;quot;secid&amp;quot;:12,&amp;quot;range&amp;quot;:&amp;quot;2930-3474&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit14&quot; id=&quot;row-processing&quot;&gt;Row processing&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
The rows received from the base with the help of either the &lt;strong&gt;getItem()&lt;/strong&gt; or &lt;strong&gt;get()&lt;/strong&gt; method, can be processed before returning them. The processor is defined with the help of an anonymous function that is passed as the &lt;strong&gt;$item_callback&lt;/strong&gt; parameter:
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$item&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$model&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
The function gets two input parameters:
&lt;/p&gt;
&lt;div class=&quot;table sectionedit15&quot;&gt;&lt;table class=&quot;inline&quot;&gt;
	&lt;tr class=&quot;row0&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt;&lt;strong&gt;$item&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;col1&quot;&gt;An array with the current row’s data&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row1&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt;&lt;strong&gt;$model&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;col1&quot;&gt;Current model’s instance&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;table&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;table5&amp;quot;,&amp;quot;secid&amp;quot;:15,&amp;quot;range&amp;quot;:&amp;quot;3840-3931&amp;quot;} --&gt;
&lt;p&gt;
The function can process the fields in the &lt;strong&gt;$item&lt;/strong&gt; array or add new ones. After that it should return the array back:
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$items&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'my_table'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$item&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$model&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;re0&quot;&gt;$item&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'date'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/date&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;date&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'d.m.Y'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/strtotime&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;strtotime&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$item&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'date'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$item&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
In this example, the processor is used to bring the date field to a proper format in each entry. In fact, you should not do so, because it is the template’s task to format the date.
&lt;/p&gt;

&lt;p&gt;
Most often, such processor is used to parse complex fields. For example, if one of the fields contains an array when saving an entry to the base (see the section below), it will be automatically transfromed to the YAML format and will be saved as a text. When extracting such an entry, you should manually perform a reverse transformation. 
&lt;/p&gt;

&lt;p&gt;
An example. Suppose, there is the &lt;strong&gt;my_table&lt;/strong&gt; table with the &lt;code&gt;id&lt;/code&gt; (int), &lt;code&gt;title&lt;/code&gt; (varchar), and &lt;code&gt;options&lt;/code&gt; (text) fields. We &lt;a href=&quot;https://docs.instantcms.ru/en/dev/models/modify&quot; class=&quot;wikilink2&quot; title=&quot;en:dev:models:modify&quot; rel=&quot;nofollow&quot; data-wiki-id=&quot;en:dev:models:modify&quot;&gt;add an entry&lt;/a&gt; to the table to make the &lt;code&gt;options&lt;/code&gt; field store several values at once:
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$new_item&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;
    &lt;span class=&quot;st_h&quot;&gt;'title'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; ‘&lt;span class=&quot;kw2&quot;&gt;New&lt;/span&gt; entry&lt;span class=&quot;st_h&quot;&gt;',
    '&lt;/span&gt;options&lt;span class=&quot;st_h&quot;&gt;' =&amp;gt; array(
        '&lt;/span&gt;first&lt;span class=&quot;st_h&quot;&gt;' =&amp;gt; 1,
        '&lt;/span&gt;second&lt;span class=&quot;st_h&quot;&gt;' =&amp;gt; 2
    )
);
&amp;nbsp;
$new_item_id = $this-&amp;gt;insert('&lt;/span&gt;my_table&lt;span class=&quot;st_h&quot;&gt;', $new_item);&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
Then we extract this entry back:
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$loaded_item&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;getItemById&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'my_table'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$new_item_id&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
In this case, we can expect the $new_item and $loaded_item arrays to be identical. However, it is not so. The &lt;code&gt;options&lt;/code&gt; field in the $loaded_item array will be a text field, but not a nested subarray. For this reason, we should transform it back to an array. You can do this by means of a processor:
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$loaded_item&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;getItemById&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'my_table'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$new_item_id&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$item&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$model&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;re0&quot;&gt;$item&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'options'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; cmsModel&lt;span class=&quot;sy0&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;me2&quot;&gt;yamlToArray&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$item&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'options'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$item&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
The &lt;strong&gt;yamlToArray()&lt;/strong&gt; method converts the YAML text back to an array. In this example, the array at output will be the same as the array at input.
&lt;/p&gt;

&lt;p&gt;
The processor works the same for the &lt;strong&gt;get()&lt;/strong&gt; method, the only difference being that it processes not one row but all rows received in turn.
&lt;/p&gt;
&lt;hr /&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Row processing&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;row-processing&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:10,&amp;quot;secid&amp;quot;:14,&amp;quot;range&amp;quot;:&amp;quot;3475-6092&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit16&quot; id=&quot;separate-fields&quot;&gt;Separate Fields&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Separate Fields&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;separate-fields&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:15,&amp;quot;secid&amp;quot;:16,&amp;quot;range&amp;quot;:&amp;quot;6093-6121&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit17&quot; id=&quot;a-field-from-a-row-with-a-known-id&quot;&gt;A field from a row with a known ID&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
You can use the following method to receive the value of a certain row’s field:
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;getField&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$table_name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$row_id&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$field_name&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;
&lt;div class=&quot;table sectionedit18&quot;&gt;&lt;table class=&quot;inline&quot;&gt;
	&lt;tr class=&quot;row0&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt;&lt;strong&gt;$table_name&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;col1&quot;&gt;Table title, without prefix&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row1&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt;&lt;strong&gt;$row_id&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;col1&quot;&gt;The &lt;code&gt;id&lt;/code&gt; field’s value of a target row&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row2&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt;&lt;strong&gt;$field_name&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;col1&quot;&gt;Field title whose value to receive&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;table&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;table6&amp;quot;,&amp;quot;secid&amp;quot;:18,&amp;quot;range&amp;quot;:&amp;quot;6313-6468&amp;quot;} --&gt;
&lt;p&gt;
An example – we will get the date of a comment with ID35:
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$pub_date&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;getField&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'comments'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;35&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'pub_date'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;A field from a row with a known ID&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;a-field-from-a-row-with-a-known-id&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:15,&amp;quot;secid&amp;quot;:17,&amp;quot;range&amp;quot;:&amp;quot;6122-6604&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit19&quot; id=&quot;a-field-from-a-row-by-option&quot;&gt;A field from a row by option&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
Rather than specifying a specific row ID, you can use a set of one or several filters. The following method is used to get the field values from a row, selected by filters:
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;getFieldFiltered&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$table_name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$field_name&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
If the applied filters return more than one row, the specified field will be returned from the first row in the set of results.
&lt;/p&gt;

&lt;p&gt;
An example – we are going to get the ID of a comment added by an administrator on a specific day:
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$id&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;me1&quot;&gt;filterEqual&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'user_id'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;me1&quot;&gt;filterEqual&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'pub_date'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'2014-12-03'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;me1&quot;&gt;getFieldFiltered&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'comments'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'id'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;hr /&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;A field from a row by option&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;a-field-from-a-row-by-option&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:17,&amp;quot;secid&amp;quot;:19,&amp;quot;range&amp;quot;:&amp;quot;6605-7263&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit20&quot; id=&quot;filtration&quot;&gt;Filtration&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
When reading the entries, the model can apply different filters that are described in details &lt;a href=&quot;https://docs.instantcms.ru/dev/models/filters&quot; class=&quot;wikilink2&quot; title=&quot;dev:models:filters&quot; rel=&quot;nofollow&quot; data-wiki-id=&quot;dev:models:filters&quot;&gt;here&lt;/a&gt;.
&lt;/p&gt;
&lt;hr /&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Filtration&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;filtration&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:19,&amp;quot;secid&amp;quot;:20,&amp;quot;range&amp;quot;:&amp;quot;7264-7417&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit21&quot; id=&quot;sorting&quot;&gt;Sorting&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
The model can set the sorting order before extracting the rows with the help of the &lt;strong&gt;get()&lt;/strong&gt; method.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Sorting&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;sorting&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:19,&amp;quot;secid&amp;quot;:21,&amp;quot;range&amp;quot;:&amp;quot;7418-7541&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit22&quot; id=&quot;by-one-field&quot;&gt;By one field&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;
&lt;pre class=&quot;code php&quot;&gt;orderBy&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$field&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$direction&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;
&lt;div class=&quot;table sectionedit23&quot;&gt;&lt;table class=&quot;inline&quot;&gt;
	&lt;tr class=&quot;row0&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt;&lt;strong&gt;$field&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;col1&quot;&gt;Field title to sort the result by&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row1&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt;&lt;strong&gt;$direction&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;col1&quot;&gt;Sorting direction – &lt;em&gt;asc (ascending) or &lt;/em&gt;desc (descending)&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;table&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;table7&amp;quot;,&amp;quot;secid&amp;quot;:23,&amp;quot;range&amp;quot;:&amp;quot;7612-7737&amp;quot;} --&gt;
&lt;p&gt;
An example – we will get a list of all users by sorting them by registration date descendingly (from new to old):
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$users&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;orderBy&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'date_reg'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'desc'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'{users}'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
As you can see in the example, the &lt;strong&gt;orderBy&lt;/strong&gt; method supports “chains of requests”, in other words, we can request any other method of the $this object right after it.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;By one field&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;by-one-field&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:19,&amp;quot;secid&amp;quot;:22,&amp;quot;range&amp;quot;:&amp;quot;7542-8107&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit24&quot; id=&quot;by-several-fields&quot;&gt;By several fields&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;
&lt;pre class=&quot;code php&quot;&gt;orderByList&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$list&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;
&lt;div class=&quot;table sectionedit25&quot;&gt;&lt;table class=&quot;inline&quot;&gt;
	&lt;tr class=&quot;row0&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt;&lt;strong&gt;$list&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;col1&quot;&gt;An array of sorting options. Each option is set by an array with the &lt;em&gt;by&lt;/em&gt; (field) and &lt;em&gt;to&lt;/em&gt; (direction) fields.&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;table&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;table8&amp;quot;,&amp;quot;secid&amp;quot;:25,&amp;quot;range&amp;quot;:&amp;quot;8174-8300&amp;quot;} --&gt;
&lt;p&gt;
An example – we are going to get all comments by sorting them by their rating and date:
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$ordering&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;
    &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'by'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'rating'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'to'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'desc'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;
    &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'by'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'pub_date'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'to'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'desc'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re0&quot;&gt;$comments&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;orderByList&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ordering&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'comments'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;hr /&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;By several fields&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;by-several-fields&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:21,&amp;quot;secid&amp;quot;:24,&amp;quot;range&amp;quot;:&amp;quot;8108-8592&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit26&quot; id=&quot;limits&quot;&gt;Limits&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
Before extracting the rows with the help of the &lt;strong&gt;get()&lt;/strong&gt; method, the model can limit the number of results.
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;limit&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$from&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$howmany&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;
&lt;div class=&quot;table sectionedit27&quot;&gt;&lt;table class=&quot;inline&quot;&gt;
	&lt;tr class=&quot;row0&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt;&lt;strong&gt;$from&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;col1&quot;&gt;Row number in the search results, starting from which the rows that got to the final result will be selected&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row1&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt;&lt;strong&gt;$howmany&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;col1&quot;&gt;Maximum number of rows in the final result&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;table&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;table9&amp;quot;,&amp;quot;secid&amp;quot;:27,&amp;quot;range&amp;quot;:&amp;quot;8766-8944&amp;quot;} --&gt;
&lt;p&gt;
This method is similar to the “LIMIT” condition in SQL-requests. Let’s consider an example. Suppose, we add a request that will return 100 rows from the base. If we specify a limit before making the request:
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;limit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
in the results, we will have not 100 rows but only 10 (from 5th to 15th).
&lt;/p&gt;

&lt;p&gt;
You have to calculate the first row’s number for each page to get a paginated list of entries. You can use the following method to avoid manual manipulations:
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;limitPage&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$page&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$perpage&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;div class=&quot;table sectionedit28&quot;&gt;&lt;table class=&quot;inline&quot;&gt;
	&lt;tr class=&quot;row0&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt;&lt;strong&gt;$page&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;col1&quot;&gt;Current page number&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row1&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt;&lt;strong&gt;$perpage&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;col1&quot;&gt;Maximum number of rows on one page&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;table&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;table10&amp;quot;,&amp;quot;secid&amp;quot;:28,&amp;quot;range&amp;quot;:&amp;quot;9483-9564&amp;quot;} --&gt;
&lt;p&gt;
For example, such limit:
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;limitPage&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
it will return the rows from 21 to 31 inclusively. 
&lt;/p&gt;

&lt;p&gt;
An example – we will get 10 latest comments (by date):
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$latest_comments&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;orderBy&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'pub_date'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'desc'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;limit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'comments'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Limits&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;limits&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:23,&amp;quot;secid&amp;quot;:26,&amp;quot;range&amp;quot;:&amp;quot;8593-9843&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit29&quot; id=&quot;joins&quot;&gt;Joins&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
When extracting entries with the help of the &lt;strong&gt;get()&lt;/strong&gt; method, the model can request several tables in the database at once, joining them. This is similar to the work of JOIN-conditions in SQL-requests.
&lt;/p&gt;

&lt;p&gt;
There are several methods available:
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;a href=&quot;http://www.php.net/join&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;join&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$table_name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$as&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$on&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;code php&quot;&gt;joinLeft&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$table_name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$as&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$on&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;code php&quot;&gt;joinLeftInner&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$table_name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$as&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$on&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;code php&quot;&gt;joinLeftOuter&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$table_name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$as&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$on&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;code php&quot;&gt;joinRight&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$table_name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$as&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$on&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;code php&quot;&gt;joinRightInner&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$table_name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$as&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$on&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;code php&quot;&gt;joinRightOuter&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$table_name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$as&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$on&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;code php&quot;&gt;joinInner&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$table_name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$as&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$on&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;code php&quot;&gt;joinOuter&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$table_name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$as&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$on&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;
&lt;div class=&quot;table sectionedit30&quot;&gt;&lt;table class=&quot;inline&quot;&gt;
	&lt;tr class=&quot;row0&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt;&lt;strong&gt;$table_name&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;col1&quot;&gt;Table title, without prefix&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row1&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt;&lt;strong&gt;$as&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;col1&quot;&gt;Joining table pseudonym (alias)&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row2&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt;&lt;strong&gt;$on&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;col1&quot;&gt;Join condition&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;table&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;table11&amp;quot;,&amp;quot;secid&amp;quot;:30,&amp;quot;range&amp;quot;:&amp;quot;10568-10680&amp;quot;} --&gt;
&lt;p&gt;
Each method adds the corresponding JOIN to the generated SQL-request. These methods should be requested right before receiving the results, i.e. before requesting the &lt;strong&gt;get()&lt;/strong&gt; method.
&lt;/p&gt;

&lt;p&gt;
The &lt;strong&gt;$as&lt;/strong&gt; parameter sets the pseudonym (alias) of the joining table, usually, it is the first letter (or several letters) of the title. 
&lt;/p&gt;

&lt;p&gt;
The &lt;strong&gt;$on&lt;/strong&gt; parameter describes the join condition (table relations) in SQL-format. Herewith, it is assumed that the source table has the «i» alias.
&lt;/p&gt;

&lt;p&gt;
Once table relations are defined, you should specify which fields from the joined table you want to see in the search results. Use the following method for this:
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;select&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$field&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$as&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;
&lt;div class=&quot;table sectionedit31&quot;&gt;&lt;table class=&quot;inline&quot;&gt;
	&lt;tr class=&quot;row0&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt;&lt;strong&gt;$field&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;col1&quot;&gt;Field title in a joining table. It is specified along with the alias, in the following format: «alias.field»&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row1&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt;&lt;strong&gt;$as&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;col1&quot;&gt;Field title in query results&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;table&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;table12&amp;quot;,&amp;quot;secid&amp;quot;:31,&amp;quot;range&amp;quot;:&amp;quot;11358-11518&amp;quot;} --&gt;
&lt;p&gt;
Let&amp;#039;s consider an example. There is the &lt;strong&gt;menu&lt;/strong&gt; table in the base that contains a list of menus available on the site (main, side, bottom, etc.). These menus’ items are stored in the &lt;strong&gt;menu_items&lt;/strong&gt; table . Each item in the &lt;strong&gt;menu_items&lt;/strong&gt; table has the &lt;strong&gt;menu_id&lt;/strong&gt; field that contains the &lt;strong&gt;id&lt;/strong&gt; of a menu, to which this item belongs. 
&lt;/p&gt;

&lt;p&gt;
Suppose, we want to receive a list of all menu items and for each item we need a menu title:
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;co1&quot;&gt;// we link the menu table&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;// we assign the &amp;quot;m&amp;quot; alias to it&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;// the source table has the &amp;quot;i&amp;quot; alias&lt;/span&gt;
&lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/join&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;join&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'menu'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'m'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'m.id = i.menu_id'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;// we want to add the title (menu title) field from the menu table to results&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;// however, since the menu_items table has the title (item title) field too,  &lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;// we will use another title - menu_title&lt;/span&gt;
&lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;select&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'m.title'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'menu_title'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;// as a result, we get the menu_items items&lt;/span&gt;
&lt;span class=&quot;re0&quot;&gt;$menu_items&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'menu_items'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;// now we can sort all menu items&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$menu_items&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$item&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;// and each of them will have the menu_title field available&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;// received from a joined table&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$item&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'menu_title'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;
&lt;hr /&gt;

&lt;p&gt;
Go to &lt;a href=&quot;https://docs.instantcms.ru/en/dev/models/modify&quot; class=&quot;wikilink2&quot; title=&quot;en:dev:models:modify&quot; rel=&quot;nofollow&quot; data-wiki-id=&quot;en:dev:models:modify&quot;&gt;Editing Entries&lt;/a&gt;
&lt;/p&gt;
&lt;hr /&gt;

&lt;p&gt;
Go to &lt;a href=&quot;https://docs.instantcms.ru/en/dev/models/filters&quot; class=&quot;wikilink2&quot; title=&quot;en:dev:models:filters&quot; rel=&quot;nofollow&quot; data-wiki-id=&quot;en:dev:models:filters&quot;&gt;Filtration&lt;/a&gt;
&lt;/p&gt;
&lt;hr /&gt;

&lt;p&gt;
Back to &lt;a href=&quot;https://docs.instantcms.ru/en/dev/models&quot; class=&quot;wikilink1&quot; title=&quot;en:dev:models&quot; data-wiki-id=&quot;en:dev:models&quot;&gt;”Models”&lt;/a&gt;
&lt;/p&gt;
&lt;hr /&gt;

&lt;p&gt;
Back to &lt;a href=&quot;https://docs.instantcms.ru/en/dev/start&quot; class=&quot;wikilink2&quot; title=&quot;en:dev:start&quot; rel=&quot;nofollow&quot; data-wiki-id=&quot;en:dev:start&quot;&gt;Documentation for Developers&lt;/a&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Joins&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;joins&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:28,&amp;quot;secid&amp;quot;:29,&amp;quot;range&amp;quot;:&amp;quot;9844-&amp;quot;} --&gt;</description>
    </item>
    <item rdf:about="https://docs.instantcms.ru/en/dev/models/overview?rev=1490793539">
        <dc:format>text/html</dc:format>
        <dc:date>2017-03-29T13:18:59+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Introduction</title>
        <link>https://docs.instantcms.ru/en/dev/models/overview?rev=1490793539</link>
        <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;introduction&quot;&gt;Introduction&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
A model is an auxiliary class used by a component to add and read the data in the base. With the help of the model you can automate most frequent operations with data:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; adding,&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; reading,&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; editing,&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; deleting,&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; filtration.&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
A model allows to avoid writing “empty” SQL-requests to query the database. Instead, it provides an interface (a set of methods) to work with the database entries like with standard associative arrays. 
&lt;/p&gt;

&lt;p&gt;
Roughly speaking, the “entry” term here and further stands for one row in some database table. Or one row from query results, when it comes to reading.
&lt;/p&gt;

&lt;p&gt;
InstantCMS does not use ORM, that is why the meaning of the “model” term is somewhat different from a conventional meaning here. An InstantCMS model is not an object presentation of one entry. The model here is only an object that contains a set of methods to work with the base. In other words, one InstantCMS model can work with any entries. However, it has common features with ORM. For example, an automatic filtration of incoming data. 
&lt;/p&gt;

&lt;p&gt;
The model adds a level of abstraction between business logic (controller) and data storage (base). In theory, this may help to change the storage (for example, to use PostgreSQL instead of MySQL) without need to customize the controller code.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Introduction&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;introduction&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;1-1322&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit2&quot; id=&quot;models-and-components&quot;&gt;Models and Components&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
Each model is a logic part of some component. The model cannot exist without a component. However, the component can contain only a model. 
&lt;/p&gt;

&lt;p&gt;
The model undertakes all the work on data extraction and editing. Other component parts (controllers, templates) should not contain any logic related to receiving or storing the data in the base. They can only request needed data from the model or vice versa pass new data to save.
&lt;/p&gt;

&lt;p&gt;
A detailed description of how to use the model inside the component is described in the proper &lt;a href=&quot;https://docs.instantcms.ru/dev/controllers/model&quot; class=&quot;wikilink1&quot; title=&quot;dev:controllers:model&quot; data-wiki-id=&quot;dev:controllers:model&quot;&gt;section&lt;/a&gt;.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Models and Components&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;models-and-components&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;1323-1911&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit3&quot; id=&quot;model-class&quot;&gt;Model Class&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
The path to the model file is formed according to the scheme: &lt;code&gt;/system/controllers/{component}/model.php&lt;/code&gt;. For example, the “Comments” component’s model is located in the &lt;code&gt;/system/controllers/comments/model.php&lt;/code&gt; file.
&lt;/p&gt;

&lt;p&gt;
Inside the file, the model class, whose title is formed like &lt;code&gt;model{Component}&lt;/code&gt;, is defined; for example, &lt;code&gt;modelComments&lt;/code&gt;. The class is inherited from the &lt;strong&gt;cmsModel&lt;/strong&gt; system class:
&lt;/p&gt;
&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt; modelExample &lt;span class=&quot;kw2&quot;&gt;extends&lt;/span&gt; cmsModel &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
The description of how to use the object of this class is &lt;a href=&quot;https://docs.instantcms.ru/en/dev/controllers/model&quot; class=&quot;wikilink1&quot; title=&quot;en:dev:controllers:model&quot; data-wiki-id=&quot;en:dev:controllers:model&quot;&gt;here&lt;/a&gt;.
&lt;/p&gt;
&lt;hr /&gt;

&lt;p&gt;
&lt;a href=&quot;https://docs.instantcms.ru/en/dev/models&quot; class=&quot;wikilink1&quot; title=&quot;en:dev:models&quot; data-wiki-id=&quot;en:dev:models&quot;&gt;Back to &amp;quot;Models&amp;quot; Section Contents&lt;/a&gt;
&lt;/p&gt;
&lt;hr /&gt;

&lt;p&gt;
&lt;a href=&quot;https://docs.instantcms.ru/en/dev/start&quot; class=&quot;wikilink2&quot; title=&quot;en:dev:start&quot; rel=&quot;nofollow&quot; data-wiki-id=&quot;en:dev:start&quot;&gt;Back to Documentation Contents&lt;/a&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Model Class&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;model-class&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:3,&amp;quot;range&amp;quot;:&amp;quot;1912-&amp;quot;} --&gt;</description>
    </item>
</rdf:RDF>
