modResource.syncScripts
Последнее обновление not available | История страницы | Улучшить эту страницу | Сообщить о проблеме
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn moremodResource::syncScripts¶
Копирует jscripts, sjscripts и loadedjscripts из экземпляра MODX в соответствующие свойства _jscripts, _sjscripts и _loadedjscripts ресурса. Скрипты, зарегистрированные кэшируемыми элементами, иначе потерялись бы после записи ресурса в кэш сайта.
Вызывается из prepare() между process() и parseContent(). modRequest снова объединяет эти свойства с экземпляром MODX, когда восстанавливает ресурс из кэша.
Синтаксис¶
void syncScripts ()
Пример¶
$resource = $modx->getObject('modResource', array('id' => 5));
$resource->prepare();
print_r($resource->_jscripts);
Смотрите также¶
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn more










