betterbrief / silverstripe-jsconfig
在您的前端和 SilverStripe 应用程序之间创建一个干净的 JavaScript 数据接口。
v1.1.1
2016-06-26 08:23 UTC
Requires
- composer/installers: ~1.0
This package is not auto-updated.
Last update: 2024-09-14 15:52:51 UTC
README
使用方法
// Send an array of things to the frontend using JSConfig JSConfig::add('name_of_json_key', MyObject::get()->toArray());
// Retrieve the inserted data, and use an imaginary template renderer to output some HTML based on that data set. templateRenderer .setTemplate('MyObjectList') .process(JSCONFIG['name_of_json_key']);