Jarves\Filesystem\WebFilesystem::move PHP Method

move() public method

public move ( $source, $target )
    public function move($source, $target)
    {
        return $this->paste($source, $target, 'move');
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * {@inheritDoc}
  */
 public function move($pk, $targetPk, $position = 'first', $targetObjectKey = null, $overwrite = false)
 {
     if ($pk) {
         $path = $this->getPathFromPK($pk);
     } else {
         $path = '/';
     }
     $target = is_numeric($targetPk['id']) ? $this->webFilesystem->getPath($targetPk['id']) : $targetPk['id'];
     $target = $target . '/' . basename($path);
     if (!$overwrite && $this->webFilesystem->has($target)) {
         return ['targetExists' => true];
     }
     $this->checkAccess($path);
     $this->checkAccess($target);
     return $this->webFilesystem->move($path, $target);
 }
All Usage Examples Of Jarves\Filesystem\WebFilesystem::move