\Bitrix\Main\EventManager::getInstance()->RegisterEventHandler(
'tasks',
'OnBeforeTaskUpdate',
$this->MODULE_ID,
'\MyCompany\Handlers\CTask',
'OnBeforeTaskUpdate',
"1"
);
\CPullWatch::Add($UserID, $dctList['UUID']);
\CPullWatch::AddToStack($list_uuid,
Array(
'module_id' => 'list',
'command' => 'exchange',
'params' => [
'provocative' => $dctData['head']['UID'],
'list_uuid'=> $list_uuid
]
)
);
BX.loadScript('/bitrix/js/pull/protobuf/protobuf.js', ()=>{
BX.loadScript('/bitrix/js/pull/protobuf/model.js', ()=>{
BX.loadScript('/bitrix/js/rest/client/rest.client.js', ()=>{
BX.loadScript('/bitrix/js/pull/client/pull.client.js',()=>{APP.bitrixreinit._pullinit()});
});
});
});
// подписываемся на события P&P
BX.addCustomEvent("onPullEvent", function(module_id,command,params) {
if (APP.getConfigParam('uid') == params.provocative) {
//if ('production' != APP.getConfigParam('mode')) console.log('собственное событие пропущено');
return;
}
if ('exchange' == command) {
APP.exchange({basis: 'pull', context: params});
}
});
BX.addCustomEvent("onPullStatus", function(status) {
if ('online' != APP.$store.state.status.push_and_pull
&& 'online' == status) {
// не онлайн сменился на онлайн
//let last_sync_time = APP.$store.state.db.sync.last.time.client || 0
//let now_time = Date.now()/1000
//if (now_time - last_sync_time < 30) {
//
//} else {
//
//}
APP.exchange({basis: 'reconnect'});
}
APP.$store.commit("updateStatus",{key:'push_and_pull',data:status})
});
BX.PULL.start();
<LocationMatch "/\.(?!well-known)">
Require all denied
</LocationMatch>
#<LocationMatch "/\.(?!well-known)">
#Require all denied
#</LocationMatch>
<?=$APPLICATION->GetCurPageParam("logout=yes&".bitrix_sessid_get(), array(
"login",
"logout",
"register",
"forgot_password",
"change_password"));?>"><?=GetMessage("AUTH_LOGOUT_BUTTON")?>
"BASKET_WITH_ORDER_INTEGRATION" => "Y"
bitrix/php_interface/admin_header.php
<script>
BX.addCustomEvent('OnEditorInitedBefore', function(toolbar) {
var _this = this;
BX.addCustomEvent(this, 'OnGetParseRules', BX.proxy(function() {
this.rules.tags['my-component'] = {}; // с дефисом
this.rules.tags.mycomponent = {}; // без дефиса
}, this));
});
</script>
но при перезагрузке страницы выводились следущие 50 элементов
\Bitrix\Main\Loader::includeModule('iblock');
$iblockId = 2;
$nPageSize = 50;
$iNumPage = 1;
$arElements = array();
$dbRes = CIBlockElement::GetList(array('ID' => 'ASC'), array('IBLOCK_ID' => $iblockId), false, array('nPageSize' => $nPageSize, 'iNumPage' => $iNumPage), array('ID', 'NAME'));
while($arRes = $dbRes->Fetch()) {
$arElements[] = $arRes;
}
echo '<pre>';
print_r($arElements);
echo '</pre>';
pdftotext "#FILE_PATH#" -enc UTF-8 -nopgbrk -
class Foo {
public $deepest = 'Limbo';
public function __toString()
{
return 'deep';
}
}
$deeper = 'deepest';
$deep = 'deeper';
$b = new Foo();
echo $b->$$$b;
Как это можно реализовать?
Задать новый паттерн для обработки адресов в файле urlrewrite.php
$arFields = array(
"CALLBACK_FUNC" => "",
"PRODUCT_PROVIDER_CLASS" => "",
"CUSTOM_PRICE" => "Y",
"IGNORE_CALLBACK_FUNC" => "Y"
);
$arFields = Array(
"ORDER_ID" => (...),
"ORDER_DATE" => (...),
"ORDER_STATUS" => (...),
"EMAIL" => (...),
"ORDER_DESCRIPTION" => (...),
"TEXT" => "",
"SALE_EMAIL" => (...)
);
$arFields
:foreach(GetModuleEvents("sale", "OnOrderStatusSendEmail", true) as $arEvent)
if (ExecuteModuleEventEx($arEvent, Array($ID, &$eventName, &$arFields, $arOrder["STATUS_ID"]))===false)
$bSend = false;
$arFields