@param Movement $reservationMovement

@throws DomainException
770879
public function beReservedByMovement(Movement $reservationMovement): void
    {
        if ($this->isReserved()) {
            throw new DomainException('The StockUnit is already reserved');
        }
        $this->reservationMovement = $reservationMovement;
    }
169831
@Override
    public final void cacheMoveValidation(Move<?> move, Validation validation) {
        validatedMove = move;
        this.validation = validation;
    }
118664
public function findReservedByMovement(Movement $mvt): array
    {
        $qb = $this->createQueryBuilder('su');
        $this->filterByLocation($qb, null, LocationType::INTERNAL);
        $this->filterByMovement($qb, $mvt);

        return $qb->getQuery()->getResult();
    }
391042
public function moveNode(string $id = null, string $action = ''): void
    {
        $moveActions = ['up', 'down'];
        if (!in_array($action, $moveActions)) {
            $this->Flash->error((string)__('Unknown move action.'));
            $this->redirect(['action' => 'index']);

            return;
        }
        $menuItem = $this->MenuItems->get($id);
        $moveFunction = 'move' . $action;
        if ($this->MenuItems->{$moveFunction}($menuItem)) {
            $this->Flash->success((string)__('{0} has been moved {1} successfully.', $menuItem->get('label'), $action));
        } else {
            $this->Flash->error((string)__('Fail to move {0} {1}.', $menuItem->get('label'), $action));
        }

        $this->redirect($this->referer());
    }
68318
public function moveToParent($movedNode, $newParent, $position=null)
    {

        $this->callBeforeListeners('move', [$movedNode, $newParent, $position]);

        $this->model()->placeAt($movedNode, $newParent, $position);

        if (!$position) {
            $this->model()->makeChildOf($movedNode, $newParent);
        } else {
            $this->model()->placeAt($movedNode, $newParent, $position);
        }

        $this->callAfterListeners('move', [$movedNode, $newParent, $position]);

        return $this;
    }
614563
public function move(int $id, ModelInterface $category): PodiumResponse
    {
        $forumMover = $this->getMover($id);

        if ($forumMover === null) {
            throw new ModelNotFoundException('Forum of given ID can not be found.');
        }

        $forumMover->prepareCategory($category);

        return $forumMover->move();
    }
54389
public function move($fromDn, $toDn, $recursively = false)
    {
        $this->getGateway()->move($fromDn, $toDn, $recursively);
    }
160128
public function handleMove(MoveEvent $event)
    {
        $document = $event->getDocument();
        if (!$document instanceof PageDocument) {
            return;
        }

        foreach ($this->documentInspector->getLocales($document) as $locale) {
            $this->routeUpdater->update($this->documentManager->find($document->getUuid(), $locale));
        }
    }
1065586
public function handlePersistRoute(PublishEvent $event)
    {
        /** @var ResourceSegmentBehavior $document */
        $document = $event->getDocument();

        if (!$this->supports($document)) {
            return;
        }

        if (!$event->getLocale()) {
            return;
        }

        if ($document instanceof HomeDocument) {
            return;
        }

        if ($document instanceof RedirectTypeBehavior && RedirectType::NONE !== $document->getRedirectType()) {
            return;
        }

        $this->persistRoute($document);
    }
1031540
public function moveFacetDown(Facet $facet)
    {
        $currentPosition = $facet->getPosition();

        if ($currentPosition > 0) {
            $prevPosition = $currentPosition - 1;
            $prevFacet = $this->om
                ->getRepository('ClarolineCoreBundle:Facet\Facet')
                ->findOneBy(array('position' => $prevPosition));
            $prevFacet->setPosition($currentPosition);
            $facet->setPosition($prevPosition);
            $this->om->persist($prevFacet);
            $this->om->persist($facet);
            $this->om->flush();
        }
    }
413105
public function moveNode($headId, $targetId = null, $mode = self::MODE_UNDER)
    {
        $head = $this->getNode($headId);
        $target = $this->getNode($targetId);

        switch ($mode) {
            case self::MODE_BEFORE:
                $operation = new MoveBefore($head, $target, $this->config, $this);
                break;
            case self::MODE_AFTER:
                $operation = new MoveAfter($head, $target, $this->config, $this);
                break;
            case self::MODE_UNDER:
                $operation = new MoveUnderEnd($head, $target, $this->config, $this);
                break;
        }

        $operation->run();
    }
995230
protected function getMoveStrategy(string $placement): MoveStrategyInterface
    {
        $adapter = $this->getManipulator();

        switch ($placement) {
            case self::PLACEMENT_BOTTOM:
                return new MoveStrategy\Bottom($adapter);
            case self::PLACEMENT_TOP:
                return new MoveStrategy\Top($adapter);
            case self::PLACEMENT_CHILD_BOTTOM:
                return new MoveStrategy\ChildBottom($adapter);
            case self::PLACEMENT_CHILD_TOP:
                return new MoveStrategy\ChildTop($adapter);
            default:
                throw new InvalidArgumentException('Unknown placement "'.$placement.'"');
        }
    }
560262
public function moveAll()
    {
        try {
            if (!$this->hasRequestParameter('ids')) {
                throw new InvalidArgumentException('Resource ids must be specified.');
            }
            $ids = [];

            foreach ($this->getRequestParameter('ids') as $id) {
                $ids[] = $id['id'];
            }

            $this->validateInstancesRoot($ids);

            if (empty($ids)) {
                throw new InvalidArgumentException('No instances specified.');
            }

            $this->signatureValidator->checkSignatures(
                $this->getRequestParameter('ids')
            );

            $this->validateMoveRequest();

            $response = $this->moveAllInstances($ids);
            $this->returnJson($response);
        } catch (\InvalidArgumentException $e) {
            $this->returnJsonError($e->getMessage());
        }
    }
389748
public void move(CmsClientSitemapEntry entry, String toPath, int position) {

        // check for valid data
        if (!isValidEntryAndPath(entry, toPath)) {
            // invalid data, do nothing
            CmsDebugLog.getInstance().printLine("invalid data, doing nothing");
            return;
        }
        // check for relevance
        if (isChangedPosition(entry, toPath, position)) {
            // only register real changes
            CmsSitemapChange change = new CmsSitemapChange(entry.getId(), entry.getSitePath(), ChangeType.modify);
            change.setDefaultFileId(entry.getDefaultFileId());
            if (!toPath.equals(entry.getSitePath())) {
                change.setParentId(getEntry(CmsResource.getParentFolder(toPath)).getId());
                change.setName(CmsResource.getName(toPath));
            }
            if (CmsSitemapView.getInstance().isNavigationMode()) {
                change.setPosition(position);
            }
            change.setLeafType(entry.isLeafType());
            CmsSitemapClipboardData data = getData().getClipboardData().copy();
            data.addModified(entry);
            change.setClipBoardData(data);
            commitChange(change, null);
        }
    }
631933
public function process(ServerRequestInterface $request, DelegateInterface $delegate)
    {
        if (null === $this->routerMatch) {
            throw new \InvalidArgumentException('RouterMatch must be set before calling the proces method.');
        }
        return $this->runRouteHandler($request);
    }
398592
public function beforeNodeMove(NodeInterface $movedNode, NodeInterface $referenceNode, $moveOperation)
    {
        if (!$this->eventEmittingService->isEnabled()) {
            return;
        }

        $this->currentlyMoving += 1;

        /* @var $nodeEvent NodeEvent */
        $nodeEvent = $this->eventEmittingService->emit(self::NODE_MOVE, [
            'referenceNode' => $referenceNode->getContextPath(),
            'moveOperation' => $moveOperation
        ], NodeEvent::class);
        $nodeEvent->setNode($movedNode);
        $this->eventEmittingService->pushContext();
    }
365906
public function move($from, $to)
    {
        $this->clearAll();

        $from = trim($from);
        if (!$this->validatePath($from)) {
            throw new \InvalidArgumentException('Invalid source path');
        }

        $to = trim($to);
        if (!$this->validatePath($to)) {
            throw new \InvalidArgumentException('Invalid destination path');
        }

        $this->addCommandName(self::GIT_MOVE);
        $this->addCommandSubject($from);
        $this->addCommandSubject2($to);

        return $this->getCommand();
    }