eZ Publish でビューをレンダリングせずに json レスポンスを取得するつもりです。
だから私はそれを行うためにカスタムモジュールを使用しようとしています:
function jsonConvert(){
$articles = eZFunctionHandler::execute(
'content',
'tree',
array(
'parent_node_id' => '59'
)
);
header("Content-Type: application/json");
return json_encode($articles);
}
echo jsonConvert();
HTMLコードなしでjson応答を取得するために、domain.com/module/view/のようなビューをレンダリングする基本的なURLを使用せずにこのモジュールをコンパイルするにはどうすればよいですか?