public function postMove(MoveEventArgs $args)
 {
     $doc = $args->getDocument();
     if (!$doc instanceof Route) {
         return;
     }
     $this->updateLocale($doc, $args->getTargetPath());
 }
Ejemplo n.º 2
0
 /**
  * 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);
 }
Ejemplo n.º 3
0
 public function testGetTargetPath()
 {
     $path = $this->eventArgs->getTargetPath();
     $this->assertEquals('target/path', $path);
 }
Ejemplo n.º 4
0
 public function preMove(MoveEventArgs $e)
 {
     $document = $e->getObject();
     if ($document instanceof CmsPage) {
         $this->pagePreMove = true;
     } elseif ($document instanceof CmsItem) {
         $this->itemPreMove = true;
     }
 }