Beispiel #1
0
 public function execute(Request $request, WorkingFolder $workingFolder, EventDispatcher $dispatcher)
 {
     $newFolderName = (string) $request->query->get('newFolderName', '');
     $createFolderEvent = new CreateFolderEvent($this->app, $workingFolder, $newFolderName);
     $dispatcher->dispatch(CKFinderEvent::CREATE_FOLDER, $createFolderEvent);
     $created = false;
     if (!$createFolderEvent->isPropagationStopped()) {
         $newFolderName = $createFolderEvent->getNewFolderName();
         $created = $workingFolder->createDir($newFolderName);
     }
     return array('newFolder' => $newFolderName, 'created' => (int) $created);
 }
Beispiel #2
0
 public function execute(Request $request, WorkingFolder $workingFolder)
 {
     $newFolderName = (string) $request->query->get('newFolderName', '');
     $workingFolder->createDir($newFolderName);
     return array('newFolder' => $newFolderName);
 }