1. Go to this page and download the library: Download fibit/bitrix-entity-helper library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
fibit / bitrix-entity-helper example snippets
use \Fibit\EntityHelper as EH;
EH::getClass(1);
// Результат: \Bitrix\Iblock\Elements\ElementOffersTable
EH::getClass("Data");
// Результат: \DataTable
EH::getClass(new \Bitrix\Main\UserTable);
// Результат: \Bitrix\Main\UserTable
use \Fibit\EntityHelper as EH;
EH::getQuery(
new \Bitrix\Main\UserTable,
array(
"select" => array("SHORT_NAME", "EMAIL"),
"filter" => array("=ACTIVE" => "Y"),
"order" => array("LAST_ACTIVITY_DATE" => "DESC"),
"limit" => 100,
)
);
use \Fibit\EntityHelper as EH;
EH::getRows(
new \Bitrix\Main\UserTable,
array(
"select" => array("SHORT_NAME", "EMAIL"),
"filter" => array("=ACTIVE" => "Y"),
"order" => array("LAST_ACTIVITY_DATE" => "DESC"),
"limit" => 100,
)
);