_getLastId($path); $this->current_folder = $this->_getNode($id); } protected function _getNode($id) { if($id) return new lmbCmsNode($id); return new lmbCmsNode(); } protected function _getLastId($path) { $path = rtrim($path, '/'); return (int)end(explode('/', $path)); } function renderFolders() { $result = ''; if($this->current_folder->getId()) $folders = lmbActiveRecord :: find('lmbCmsNode', 'parent_id = '. $this->current_folder->getId()); else $folders = $this->current_folder->getRoots(); foreach($folders as $folder) { $title = htmlspecialchars($folder->getTitle(), ENT_QUOTES); $result .= ""; } return $result; } } ?>