TestCeidg.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. Lib::loadClass('RouteBase');
  3. Lib::loadClass('P5');
  4. Lib::loadClass('Core_AclHelper');
  5. class Route_TestCeidg extends RouteBase {
  6. public function defaultAction() {
  7. UI::gora();
  8. UI::startContainer();
  9. try {
  10. echo UI::h('a', [
  11. 'class' => "btn btn-primary",
  12. 'href' => Router::getRoute('Storage')->getLink('objectStruct', ['idStorage'=>36, 'namespace'=>'default_db/BI_audit_CEIDG/BI_audit_CEIDG']),
  13. ], "Storage BI_audit_CEIDG");
  14. $refTableCom = ACL::getRefTable('default_db/BI_audit_CEIDG/BI_audit_CEIDG', 'default_db__x3A__BI_audit_CEIDG_powiazania:BI_audit_CEIDG_powiazania');
  15. $refTablePer = ACL::getRefTable('default_db/BI_audit_CEIDG/BI_audit_CEIDG', 'default_db__x3A__BI_audit_CEIDG_pelnomocnicy:BI_audit_CEIDG_pelnomocnicy');
  16. echo UI::h('pre', [], "
  17. Tabela `{$refTableCom}`: 'default_db/BI_audit_CEIDG/BI_audit_CEIDG' ref do 'default_db__x3A__BI_audit_CEIDG_powiazania:BI_audit_CEIDG_powiazania'
  18. Tablea `{$refTablePer}`: 'default_db/BI_audit_CEIDG/BI_audit_CEIDG' ref do 'default_db__x3A__BI_audit_CEIDG_pelnomocnicy:BI_audit_CEIDG_pelnomocnicy'
  19. ");
  20. $ceidgItems = ACL::getAclByNamespace('default_db/BI_audit_CEIDG/BI_audit_CEIDG')->buildQuery([
  21. 'cols' => [ // TODO:? propertyName = []
  22. 'ID',
  23. 'identyfikatorWpisu',
  24. 'imie',
  25. 'nazwisko',
  26. 'nip',
  27. 'regon',
  28. 'firma',
  29. 'miejscowosc',
  30. 'ulica',
  31. 'budynek',
  32. 'lokal',
  33. 'kodPocztowy',
  34. 'poczta',
  35. 'kraj',
  36. 'gmina',
  37. 'powiat',
  38. 'wojewodztwo',
  39. 'default_db__x3A__BI_audit_CEIDG_powiazania:BI_audit_CEIDG_powiazania/*', // TODO: '/**' recursive - deep limit?
  40. 'default_db__x3A__BI_audit_CEIDG_pelnomocnicy:BI_audit_CEIDG_pelnomocnicy/*', // TODO: '/**' recursive - deep limit?
  41. ]
  42. ])->getItems([
  43. 'limit' => 10
  44. ]);
  45. DBG::nicePrint($ceidgItems, '$ceidgItems - limit 10');
  46. } catch (Exception $e) {
  47. DBG::log($e);
  48. UI::alert('danger', $e->getMessage());
  49. }
  50. UI::endContainer();
  51. UI::dol();
  52. }
  53. }