modResource.getContent
Последнее обновление 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::getContent¶
Возвращает содержимое, хранящееся в ресурсе, с тегами и всем остальным — ничего не парсится. Метод объявлен в самом modResource, а не унаследован: класс не расширяет modElement.
modStaticResource переопределяет метод и читает источник из файла, а не из поля.
Синтаксис¶
string getContent ([array $options = array()])
-
$options(array) если содержит ключcontent, возвращается именно это значение вместо сохранённого, по умолчаниюarray()
Пример¶
$resource = $modx->getObject('modResource', array('id' => 5));
$content = $resource->getContent();
$preview = $resource->getContent(array('content' => 'foobar'));
Смотрите также¶
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










