public function resolveRequest(Request $request, $action = null)
    {
        $this->setDirPath($request->get('dir_path'));

        $this->setCurrentFile($this->getPath($this->getDirPath(), $request->get('filename'), true));

        if ($action === self::FILE_RENAME && !$this->getCurrentFile()->isDir()) {
            $extension = $this->getCurrentFile()->getExtension();
            $target_file = $request->get('target_file') . "." . $extension;
        } elseif ($action === self::FILE_PASTE) {

            $sources = $this->container->get('session')->get('copy');
            $this->setCurrentFile($sources['source_dir'] . FileManager::DS . $sources['source_file']);
            $target_file = $request->get('target_file') . FileManager::DS . $sources['source_file'];
        } else {
            $target_file = $request->get('target_file');
        }

        if (isset($target_file)) {
            $this->setTargetFile($target_file);
        }
    }
public function resolveRequest(Request $request, $action = null)
    {
        $this->setDirPath($request->get('dir_path'));

        $this->setCurrentFile($this->getPath($this->getDirPath(), $request->get('filename'), true));

        if ($action === self::FILE_RENAME && !$this->getCurrentFile()->isDir()) {
            $extension = $this->getCurrentFile()->getExtension();
            $target_file = $request->get('target_file') . "." . $extension;
        } elseif ($action === self::FILE_PASTE) {

            $sources = $this->container->get('session')->get('copy');
            $this->setCurrentFile($sources['source_dir'] . FileManager::DS . $sources['source_file']);
            $target_file = $request->get('target_file') . FileManager::DS . $sources['source_file'];
        } else {
            $target_file = $request->get('target_file');
        }

        if (isset($target_file)) {
            $this->setTargetFile($target_file);
        }
    }
public function resolveRequest ( Request $ request , $ action = null ) { $ this -> setDirPath ( $ request -> get ( 'dir_path' ) ) ; $ this -> setCurrentFile ( $ this -> getPath ( $ this -> getDirPath ( ) , $ request -> get ( 'filename' ) , true ) ) ; if ( $ action === self :: FILE_RENAME && ! $ this -> getCurrentFile ( ) -> isDir ( ) ) { $ extension = $ this -> getCurrentFile ( ) -> getExtension ( ) ; $ target_file = $ request -> get ( 'target_file' ) . "." . $ extension ; } elseif ( $ action === self :: FILE_PASTE ) { $ sources = $ this -> container -> get ( 'session' ) -> get ( 'copy' ) ; $ this -> setCurrentFile ( $ sources [ 'source_dir' ] . FileManager :: DS . $ sources [ 'source_file' ] ) ; $ target_file = $ request -> get ( 'target_file' ) . FileManager :: DS . $ sources [ 'source_file' ] ; } else { $ target_file = $ request -> get ( 'target_file' ) ; } if ( isset ( $ target_file ) ) { $ this -> setTargetFile ( $ target_file ) ; } }
Set the required request parameters to the object

@param Request  $request
@param int|null $action
Set the required request parameters to the object