public function postMove(MoveEventArgs $args) { $doc = $args->getDocument(); if (!$doc instanceof Route) { return; } $this->updateLocale($doc, $args->getTargetPath()); }
/** * Update a locale after the route has been moved. * * @param MoveEventArgs $args */ public function postMove(MoveEventArgs $args) { $doc = $args->getObject(); if (!$doc instanceof Route) { return; } $this->updateLocale($doc, $args->getTargetPath(), $args->getObjectManager(), true); }
public function testGetTargetPath() { $path = $this->eventArgs->getTargetPath(); $this->assertEquals('target/path', $path); }
public function preMove(MoveEventArgs $e) { $document = $e->getObject(); if ($document instanceof CmsPage) { $this->pagePreMove = true; } elseif ($document instanceof CmsItem) { $this->itemPreMove = true; } }