| @@ 110-116 (lines=7) @@ | ||
| 107 | * |
|
| 108 | * @param object $entity |
|
| 109 | */ |
|
| 110 | protected function updateEntity($entity, ObjectManager $manager) { |
|
| 111 | $document = $this->getEntityToDocumentMapper()->createDocument($manager, $entity); |
|
| 112 | if($document !== false) { |
|
| 113 | $this->getSearchService($manager)->saveDocument($document); |
|
| 114 | $this->needsFlush = true; |
|
| 115 | } |
|
| 116 | } |
|
| 117 | ||
| 118 | /** |
|
| 119 | * |
|
| @@ 122-128 (lines=7) @@ | ||
| 119 | * |
|
| 120 | * @param object $entity |
|
| 121 | */ |
|
| 122 | protected function removeEntity($entity, ObjectManager $manager) { |
|
| 123 | $document = $this->getEntityToDocumentMapper()->createDocument($manager, $entity); |
|
| 124 | if($document !== false) { |
|
| 125 | $this->getSearchService($manager)->removeDocument($document); |
|
| 126 | $this->needsFlush = true; |
|
| 127 | } |
|
| 128 | } |
|
| 129 | } |
|