ajaxgetdropmenu.html.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * The ajaxgetdropmenu view file of program module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
  6. * @author Sun Guangming<sunguangming@easycorp.ltd>
  7. * @package project
  8. * @version $Id
  9. * @link https://www.zentao.net
  10. */
  11. namespace zin;
  12. $topItem = array();
  13. $topItem['id'] = 0;
  14. $topItem['type'] = 'program';
  15. $topItem['text'] = $lang->program->common;
  16. $topItem['url'] = false;
  17. $topItem['label'] = false;
  18. $topItem['items'] = $programTree;
  19. /**
  20. * 定义最终的 JSON 数据。
  21. * Define the final json data.
  22. */
  23. $json = array();
  24. $json['data'] = array($topItem);
  25. $json['searchHint'] = $lang->searchAB;
  26. $json['link'] = array('program' => $link);
  27. $json['labelMap'] = array('program' => $lang->program->common);
  28. $json['expandName'] = 'closed';
  29. $json['itemType'] = 'program';
  30. /**
  31. * 渲染 JSON 字符串并发送到客户端。
  32. * Render json data to string and send to client.
  33. */
  34. renderJson($json);