/** * Метод возвращает видимые пользователю объекты из базы */ public function getVisibleObjects(FoldedResources $folded, $objName, array $visibleIdents) { $folded->assertWorkWithTable(); $cacheKey = $folded->getUnique("visible-{$objName}"); if (!$this->CACHE->has($cacheKey)) { $view = $folded->getTableView(); $colIdent = $folded->getTableColumnIdent(); $colStype = $folded->getTableColumnStype(); $where = array(); if ($colStype) { $where[$colStype] = $folded->getFoldingSubType(); } $this->CACHE->set($cacheKey, $this->getArray(Query::select('*', $view, $where), null, ObjectQueryFetcher::inst($objName, $colIdent)->setIncludeKeys($visibleIdents))); } return $this->CACHE->get($cacheKey); }
/** * Возвращает признак - содержится ли в данном столбце идентификатор переданного фолдинга */ public function isHoldFoldingIdent(FoldedResources $folding) { return $folding->getTableColumnIdent() == $this->getName(); }