public function getThemeNames() { $folder = new \GO\Base\Fs\Folder(\GO::config()->root_path . 'views/Extjs3/themes'); $items = $folder->ls(); $themes = array(); foreach ($items as $folder) { if ($folder->isFolder() && $folder->child('Layout.php')) { $themes[] = $folder->name(); } } return $themes; }
/** * Moves the node * * @param string $name The new name * @return void */ public function move($newPath) { \GO::debug("FSD::move({$newPath})"); if (!is_dir(dirname($newPath))) { throw new \Exception('Invalid move!'); } $folder = $this->_getFolder(); if (!$folder->checkPermissionLevel(\GO\Base\Model\Acl::WRITE_PERMISSION)) { throw new Sabre\DAV\Exception\Forbidden(); } $destFsFolder = new \GO\Base\Fs\Folder($newPath); //\GO::debug("Dest folder: ".$destFsFolder->stripFileStoragePath()); $destFolder = \GO\Files\Model\Folder::model()->findByPath($destFsFolder->parent()->stripFileStoragePath()); $folder->parent_id = $destFolder->id; $folder->name = $destFsFolder->name(); $folder->save(); $this->relpath = $folder->path; $this->path = \GO::config()->file_storage_path . $this->relpath; }