|
|
@@ -0,0 +1,62 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+Lib::loadClass('RouteBase');
|
|
|
+Lib::loadClass('P5');
|
|
|
+Lib::loadClass('Core_AclHelper');
|
|
|
+
|
|
|
+class Route_TestKrs extends RouteBase {
|
|
|
+
|
|
|
+ public function defaultAction() {
|
|
|
+ UI::gora();
|
|
|
+ UI::startContainer();
|
|
|
+ try {
|
|
|
+ echo UI::h('a', [
|
|
|
+ 'class' => "btn btn-primary",
|
|
|
+ 'href' => Router::getRoute('Storage')->getLink('objectStruct', ['idStorage'=>36, 'namespace'=>'default_db/BI_audit_KRS/BI_audit_KRS']),
|
|
|
+ ], "Storage BI_audit_KRS");
|
|
|
+
|
|
|
+ $refTableCom = ACL::getRefTable('default_db/BI_audit_KRS/BI_audit_KRS', 'default_db__x3A__BI_audit_KRS_company:BI_audit_KRS_company');
|
|
|
+ $refTablePer = ACL::getRefTable('default_db/BI_audit_KRS/BI_audit_KRS', 'default_db__x3A__BI_audit_KRS_person:BI_audit_KRS_person');
|
|
|
+ echo UI::h('pre', [], "
|
|
|
+ Tabela `{$refTableCom}`: 'default_db/BI_audit_KRS/BI_audit_KRS' ref do 'default_db__x3A__BI_audit_KRS_company:BI_audit_KRS_company'
|
|
|
+ Tablea `{$refTablePer}`: 'default_db/BI_audit_KRS/BI_audit_KRS' ref do 'default_db__x3A__BI_audit_KRS_person:BI_audit_KRS_person'
|
|
|
+ ");
|
|
|
+
|
|
|
+ $krsItems = ACL::getAclByNamespace('default_db/BI_audit_KRS/BI_audit_KRS')->buildQuery([
|
|
|
+ 'cols' => [ // TODO:? propertyName = []
|
|
|
+ 'ID',
|
|
|
+ 'A_STATUS_INFO',
|
|
|
+ 'A_kod',
|
|
|
+ 'A_kraj',
|
|
|
+ 'A_miejscowosc',
|
|
|
+ 'A_nrDomu',
|
|
|
+ 'A_nrLokalu',
|
|
|
+ 'A_poczta',
|
|
|
+ 'A_ulica',
|
|
|
+ 'L_APPOITMENT_USER',
|
|
|
+ 'S_gmina',
|
|
|
+ 'S_kraj',
|
|
|
+ 'S_miejscowosc',
|
|
|
+ 'S_powiat',
|
|
|
+ 'S_wojewodztwo',
|
|
|
+ 'dataDokumentu',
|
|
|
+ 'krs',
|
|
|
+ 'nazwa',
|
|
|
+ 'nip',
|
|
|
+ 'regon',
|
|
|
+ 'default_db__x3A__BI_audit_KRS_company:BI_audit_KRS_company/*', // TODO: '/**' recursive - deep limit?
|
|
|
+ 'default_db__x3A__BI_audit_KRS_person:BI_audit_KRS_person/*', // TODO: '/**' recursive - deep limit?
|
|
|
+ ]
|
|
|
+ ])->getItems([
|
|
|
+ 'limit' => 10
|
|
|
+ ]);
|
|
|
+ DBG::nicePrint($krsItems, '$krsItems - limit 10');
|
|
|
+ } catch (Exception $e) {
|
|
|
+ DBG::log($e);
|
|
|
+ UI::alert('danger', $e->getMessage());
|
|
|
+ }
|
|
|
+ UI::endContainer();
|
|
|
+ UI::dol();
|
|
|
+ }
|
|
|
+
|
|
|
+}
|