|
|
@@ -25,7 +25,24 @@ class AntAclBase extends Core_AclBase {
|
|
|
public function getPrimaryKeyField() { return $this->_primaryKey; }
|
|
|
public function getFieldListByIdZasob() { return $this->getRealFieldListByIdZasob(); }
|
|
|
public function getVirtualFieldListByIdZasob() { return []; }
|
|
|
- public function getVisibleFieldListByIdZasob() { return $this->getRealFieldListByIdZasob(); } // TODO: get visible fields
|
|
|
+ // public function getVisibleFieldListByIdZasob() { return $this->getRealFieldListByIdZasob(); } // TODO: get visible fields
|
|
|
+ public function getVisibleFieldListByIdZasob() {
|
|
|
+ $fields = $this->getRealFieldListByIdZasob();
|
|
|
+ $pkField = $this->getPrimaryKeyField();
|
|
|
+ $cols = array();
|
|
|
+ foreach ($fields as $kFieldID => $fieldName) {
|
|
|
+ if ($pkField === $fieldName) {
|
|
|
+ $id = $kFieldID;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $cols[$id] = 'ID';
|
|
|
+ foreach ($fields as $kFieldID => $fieldName) {
|
|
|
+ if ($pkField === $fieldName) continue;
|
|
|
+ $cols[$kFieldID] = $fieldName;
|
|
|
+ }
|
|
|
+ return $cols;
|
|
|
+ }
|
|
|
public function getRealFieldListByIdZasob() {
|
|
|
$cols = array();
|
|
|
$fakeZasobId = 1000000;
|
|
|
@@ -59,6 +76,21 @@ class AntAclBase extends Core_AclBase {
|
|
|
public function getAttributesFromZasoby() {
|
|
|
return [];// TODO: ...
|
|
|
}
|
|
|
+ public function getXsdFieldParam($fieldName, $paramKey) { // TODO: fetch from db
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ // public function getXsdFieldParam($fieldName, $paramKey) { // TableAcl
|
|
|
+ // return ($this->_schemaClass)
|
|
|
+ // ? $this->_schemaClass->getFieldParam($fieldName, $paramKey)
|
|
|
+ // : null
|
|
|
+ // ;
|
|
|
+ // }
|
|
|
+ // public function getXsdFieldParam($fieldName, $paramKey) { // SimpleSchema
|
|
|
+ // if (empty($this->_simpleSchema['root'][$fieldName])) return null;
|
|
|
+ // if (empty($this->_simpleSchema['root'][$fieldName]['@@params'])) return null;
|
|
|
+ // if (empty($this->_simpleSchema['root'][$fieldName]['@@params'][$paramKey])) return null;
|
|
|
+ // return $this->_simpleSchema['root'][$fieldName]['@@params'][$paramKey];
|
|
|
+ // }
|
|
|
|
|
|
public function isGeomField($fieldName) {
|
|
|
return ('the_geom' === $fieldName); // TODO: ...
|