src/Sulu/Bundle/PageBundle/Search/EventSubscriber/BlameTimestampSubscriber.php
private function mapTimestamp(Document $document, \DateTime $created = null, \DateTime $changed = null)
    {
        $document->addField(
            $this->factory->createField('created', $created ? $created->format('c') : null, 'string')
        );

        $document->addField(
            $this->factory->createField('changed', $changed ? $changed->format('c') : null, 'string')
        );
    }
private function mapTimestamp(Document $document, \DateTime $created = null, \DateTime $changed = null)
    {
        $document->addField(
            $this->factory->createField('created', $created ? $created->format('c') : null, 'string')
        );

        $document->addField(
            $this->factory->createField('changed', $changed ? $changed->format('c') : null, 'string')
        );
    }
private function mapTimestamp ( Document $ document , \ DateTime $ created = null , \ DateTime $ changed = null ) { $ document -> addField ( $ this -> factory -> createField ( 'created' , $ created ? $ created -> format ( 'c' ) : null , 'string' ) ) ; $ document -> addField ( $ this -> factory -> createField ( 'changed' , $ changed ? $ changed -> format ( 'c' ) : null , 'string' ) ) ; }
Map timestamps to the search document.

@param Document $document
@param \DateTime $created
@param \DateTime $changed
Map timestamps to the search document .