Example #1
0
 /**
  * {@inheritdoc}
  */
 public function saveStructureData(AbstractMappingEvent $event)
 {
     // Set the structure type
     $document = $event->getDocument();
     if (!$this->supportsBehavior($document)) {
         return;
     }
     if (!$document->getStructureType()) {
         return;
     }
     if (!$event->getLocale()) {
         return;
     }
     $node = $event->getNode();
     $locale = $event->getLocale();
     $options = $event->getOptions();
     $this->mapContentToNode($document, $node, $locale, $options['ignore_required']);
     $node->setProperty($this->getStructureTypePropertyName($document, $locale), $document->getStructureType());
 }