plugin/path/Listener/Resource/PathListener.php
private function createResourcesCopyDirectory(ResourceNode $destination, $pathName)
    {
        // Get current User
        $user = $this->tokenStorage->getToken()->getUser();

        $resourcesDir = $this->resourceManager->createResource(
            Directory::class,
            $pathName.' ('.$this->translator->trans('resources', [], 'platform').')'
        );

        return $this->resourceManager->create(
            $resourcesDir,
            $destination->getResourceType(),
            $user,
            $destination->getWorkspace(),
            $destination
        );
    }
private function createResourcesCopyDirectory(ResourceNode $destination, $pathName)
    {
        // Get current User
        $user = $this->tokenStorage->getToken()->getUser();

        $resourcesDir = $this->resourceManager->createResource(
            Directory::class,
            $pathName.' ('.$this->translator->trans('resources', [], 'platform').')'
        );

        return $this->resourceManager->create(
            $resourcesDir,
            $destination->getResourceType(),
            $user,
            $destination->getWorkspace(),
            $destination
        );
    }
private function createResourcesCopyDirectory ( ResourceNode $ destination , $ pathName ) { // Get current User $ user = $ this -> tokenStorage -> getToken ( ) -> getUser ( ) ; $ resourcesDir = $ this -> resourceManager -> createResource ( Directory :: class , $ pathName . ' (' . $ this -> translator -> trans ( 'resources' , [ ] , 'platform' ) . ')' ) ; return $ this -> resourceManager -> create ( $ resourcesDir , $ destination -> getResourceType ( ) , $ user , $ destination -> getWorkspace ( ) , $ destination ) ; }
Create directory to store copies of resources.

@param ResourceNode $destination
@param string       $pathName

@return AbstractResource
Create directory to store copies of resources .