/** * @absctract */ public function getDocs($tvlist = '') { if ($tvlist == '') { $tvlist = $this->getCFGDef('tvList', ''); } $this->extTV->getAllTV_Name(); if ($this->extPaginate = $this->getExtender('paginate')) { $this->extPaginate->init($this); } else { $this->setConfig(array('start' => 0)); } $type = $this->getCFGDef('idType', 'parents'); $this->_docs = $type == 'parents' ? $this->getChildrenList() : $this->getDocList(); if ($tvlist != '' && count($this->_docs) > 0) { $tv = $this->extTV->getTVList(array_keys($this->_docs), $tvlist); if (!is_array($tv)) { $tv = array(); } foreach ($tv as $docID => $TVitem) { if (isset($this->_docs[$docID]) && is_array($this->_docs[$docID])) { $this->_docs[$docID] = array_merge($this->_docs[$docID], $TVitem); } else { unset($this->_docs[$docID]); } } } if (1 == $this->getCFGDef('tree', '0')) { $this->treeBuild('id', 'parent'); } return $this->_docs; }