src/Sulu/Bundle/PageBundle/Search/EventSubscriber/StructureSubscriber.php
private function indexDocument($document)
    {
        if (!$document instanceof StructureBehavior) {
            return;
        }

        if ($document instanceof SecurityBehavior && !empty($document->getPermissions())) {
            return;
        }

        $this->searchManager->index($document);
    }
private function indexDocument($document)
    {
        if (!$document instanceof StructureBehavior) {
            return;
        }

        if ($document instanceof SecurityBehavior && !empty($document->getPermissions())) {
            return;
        }

        $this->searchManager->index($document);
    }
private function indexDocument ( $ document ) { if ( ! $ document instanceof StructureBehavior ) { return ; } if ( $ document instanceof SecurityBehavior && ! empty ( $ document -> getPermissions ( ) ) ) { return ; } $ this -> searchManager -> index ( $ document ) ; }
Index document in search implementation depending
on the publish state.

@param object $document
Index document in search implementation depending on the publish state .