src/Phlexible/Bundle/MediaManagerBundle/Controller/FolderController.php
public function renameAction(Request $request)
    {
        $volumeId = $request->get('site_id');
        $folderId = $request->get('folder_id');
        $folderName = $request->get('folder_name');

        $volume = $this->getVolume($volumeId);
        $folder = $volume->findFolder($folderId);

        $volume->renameFolder($folder, $folderName, $this->getUser()->getId());

        return new ResultResponse(true, 'Folder renamed.', [
            'folder_name' => $folderName,
        ]);
    }
public function renameAction(Request $request)
    {
        $volumeId = $request->get('site_id');
        $folderId = $request->get('folder_id');
        $folderName = $request->get('folder_name');

        $volume = $this->getVolume($volumeId);
        $folder = $volume->findFolder($folderId);

        $volume->renameFolder($folder, $folderName, $this->getUser()->getId());

        return new ResultResponse(true, 'Folder renamed.', [
            'folder_name' => $folderName,
        ]);
    }
public function renameAction ( Request $ request ) { $ volumeId = $ request -> get ( 'site_id' ) ; $ folderId = $ request -> get ( 'folder_id' ) ; $ folderName = $ request -> get ( 'folder_name' ) ; $ volume = $ this -> getVolume ( $ volumeId ) ; $ folder = $ volume -> findFolder ( $ folderId ) ; $ volume -> renameFolder ( $ folder , $ folderName , $ this -> getUser ( ) -> getId ( ) ) ; return new ResultResponse ( true , 'Folder renamed.' , [ 'folder_name' => $ folderName , ] ) ; }
Rename folder.

@param Request $request

@return ResultResponse
@Route("/rename", name="mediamanager_folder_rename")
Rename folder .