getMovedResource(); $rolePrivilegeList = $this->getRolePrivilegeRetriever()->retrieveByResourceIds([ $event->getDestinationClass()->getUri(), $movedResource->getUri() ]); $this->getPermissionService()->saveResourcePermissionsRecursive( $movedResource, $rolePrivilegeList ); } private function getRolePrivilegeRetriever(): RolePrivilegeRetriever { return $this->getServiceLocator()->get(RolePrivilegeRetriever::class); } private function getPermissionService(): PermissionsService { return $this->getServiceLocator()->get(PermissionsServiceFactory::class)->create(); } }