src/Sulu/Component/Content/Document/Subscriber/BlameSubscriber.php
public function setBlamesOnDocument(HydrateEvent $event)
    {
        $document = $event->getDocument();

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

        $node = $event->getNode();
        $locale = $event->getLocale();
        $encoding = $this->getPropertyEncoding($document);

        $accessor = $event->getAccessor();

        $accessor->set(
            static::CHANGER,
            $node->getPropertyValueWithDefault(
                $this->propertyEncoder->encode($encoding, static::CHANGER, $locale),
                null
            )
        );

        $accessor->set(
            static::CREATOR,
            $node->getPropertyValueWithDefault(
                $this->propertyEncoder->encode($encoding, static::CREATOR, $locale),
                null
            )
        );
    }
public function setBlamesOnDocument(HydrateEvent $event)
    {
        $document = $event->getDocument();

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

        $node = $event->getNode();
        $locale = $event->getLocale();
        $encoding = $this->getPropertyEncoding($document);

        $accessor = $event->getAccessor();

        $accessor->set(
            static::CHANGER,
            $node->getPropertyValueWithDefault(
                $this->propertyEncoder->encode($encoding, static::CHANGER, $locale),
                null
            )
        );

        $accessor->set(
            static::CREATOR,
            $node->getPropertyValueWithDefault(
                $this->propertyEncoder->encode($encoding, static::CREATOR, $locale),
                null
            )
        );
    }
public function setBlamesOnDocument ( HydrateEvent $ event ) { $ document = $ event -> getDocument ( ) ; if ( ! $ this -> supports ( $ document ) ) { return ; } $ node = $ event -> getNode ( ) ; $ locale = $ event -> getLocale ( ) ; $ encoding = $ this -> getPropertyEncoding ( $ document ) ; $ accessor = $ event -> getAccessor ( ) ; $ accessor -> set ( static :: CHANGER , $ node -> getPropertyValueWithDefault ( $ this -> propertyEncoder -> encode ( $ encoding , static :: CHANGER , $ locale ) , null ) ) ; $ accessor -> set ( static :: CREATOR , $ node -> getPropertyValueWithDefault ( $ this -> propertyEncoder -> encode ( $ encoding , static :: CREATOR , $ locale ) , null ) ) ; }
Sets the changer and creator of the document.

@param HydrateEvent $event
Sets the changer and creator of the document .