PHP Класс Sulu\Bundle\ContentBundle\Search\EventSubscriber\BlameTimestampSubscriber

Works for objects implementing interfaces (UserBlameInterface and TimestampableInterface).
Наследование: implements Symfony\Component\EventDispatcher\EventSubscriberInterface
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( Massive\Bundle\SearchBundle\Search\Factory $factory, EntityManager $entityManager )
getSubscribedEvents ( )
handleBlameTimestamp ( Massive\Bundle\SearchBundle\Search\Event\PreIndexEvent $event ) Map blame and timestamp information to the search document.
handleBlameTimestampHitMapping ( Massive\Bundle\SearchBundle\Search\Event\HitEvent $event ) Map the changer and created from the field data to the search document (we don't include the field data in the search result API).

Приватные методы

Метод Описание
doHandleBlameTimestampHitMapping ( Document $document )
getFieldValue ( mixed $document, mixed $fieldName ) Return the named field from the document or return null.
mapCreatorAndChanger ( Document $document, Sulu\Component\Security\Authentication\UserInterface $creator = null, Sulu\Component\Security\Authentication\UserInterface $changer = null ) Map the creator and changer to the document.
mapTimestamp ( Document $document, DateTime $created = null, DateTime $changed = null ) Map timestamps to the search document.

Описание методов

__construct() публичный Метод

public __construct ( Massive\Bundle\SearchBundle\Search\Factory $factory, EntityManager $entityManager )
$factory Massive\Bundle\SearchBundle\Search\Factory
$entityManager Doctrine\ORM\EntityManager

getSubscribedEvents() публичный статический Метод

public static getSubscribedEvents ( )

handleBlameTimestamp() публичный Метод

Map blame and timestamp information to the search document.
public handleBlameTimestamp ( Massive\Bundle\SearchBundle\Search\Event\PreIndexEvent $event )
$event Massive\Bundle\SearchBundle\Search\Event\PreIndexEvent

handleBlameTimestampHitMapping() публичный Метод

Map the changer and created from the field data to the search document (we don't include the field data in the search result API).
public handleBlameTimestampHitMapping ( Massive\Bundle\SearchBundle\Search\Event\HitEvent $event )
$event Massive\Bundle\SearchBundle\Search\Event\HitEvent