use Bitrix\Main\Application;
use Bitrix\Highloadblock\HighloadBlockTable;
use Bitrix\Main\Loader;
Loader::includeModule('highloadblock');
Loader::includeModule('iblock');
$hlBlockId = 2;
$hlblock = HighloadBlockTable::getById($hlBlockId)->fetch();
/** @var \Bitrix\Main\Entity\Base $entity */
$entity = HighloadBlockTable::compileEntity($hlblock);
/** @var \Bitrix\Main\Entity\DataManager $dataClass */
$dataClass = $entity->getDataClass();
Application::getConnection()->startTracker();
$result = $dataClass::getList([
'select' => array(
'UF_ELEMENT_ID',
'NAME' => 'ELEMENT.NAME',
'CODE' => 'ELEMENT.CODE',
'DETAIL_PICTURE' => 'ELEMENT.DETAIL_PICTURE',
),
'runtime' => array(
'ELEMENT' => array(
'data_type' => '\Bitrix\Iblock\ElementTable',
'reference' => array(
'=this.UF_ELEMENT_ID' => 'ref.ID'
),
'join_type' => 'inner'
),
),
'limit' => 10,
]);
// Можно смотреть сформированный запрос
echo '<pre>', $result->getTrackerQuery()->getSql(), '</pre>';
while ($row = $result->fetch()) {
echo '<pre>';print_r($row);echo '</pre>';
}
var jBox = require('jbox');
new jBox(...)
.block{
animation: upper 1s linear infinite;
}
// from jQuery lib
globalEval: function( data ) {
if ( data && rnotwhite.test( data ) ) {
// We use execScript on Internet Explorer
// We use an anonymous function so that context is window
// rather than jQuery in Firefox
( window.execScript || function( data ) {
window[ "eval" ].call( window, data );
} )( data );
}
}
CFile::MakeFileArray($id);
$dbElement = CIBlockElement::GetList(array('ID' => 'DESC'), array('IBLOCK_ID' => 23));
while($aElem = $dbElement->Fetch()) {
var_dump($aElem);
};
$dbElem = new CIBlockElement;
var_dump($dbElem->Add(
array(
"NAME" => 'Test2',
"IBLOCK_ID" => 23,
'ACTIVE' => 'Y',
'PREVIEW_TEXT' => 'текст для списка элементов',
//'DETAIL_PICTURE' => CFile::MakeFileArray(545)
)
));
var_dump($dbElem->Add(
array(
"NAME" => 'Test3',
"IBLOCK_ID" => 23,
'ACTIVE' => 'Y',
'PREVIEW_TEXT' => 'текст для списка элементов',
'DETAIL_PICTURE' => CFile::MakeFileArray(545)
)
));