| @@ 22-45 (lines=24) @@ | ||
| 19 | /** |
|
| 20 | * A Search Engine slot handling HideLocationSignal. |
|
| 21 | */ |
|
| 22 | class HideLocation extends AbstractSubtree |
|
| 23 | { |
|
| 24 | /** |
|
| 25 | * Receive the given $signal and react on it. |
|
| 26 | * |
|
| 27 | * @param \eZ\Publish\Core\SignalSlot\Signal $signal |
|
| 28 | */ |
|
| 29 | public function receive(Signal $signal) |
|
| 30 | { |
|
| 31 | if (!$signal instanceof Signal\LocationService\HideLocationSignal || !$this->canIndex()) { |
|
| 32 | return; |
|
| 33 | } |
|
| 34 | ||
| 35 | if ( |
|
| 36 | $this->searchHandler instanceof FullTextIndexing && |
|
| 37 | !$this->searchHandler instanceof ContentIndexing && |
|
| 38 | !$this->searchHandler instanceof LocationIndexing |
|
| 39 | ) { |
|
| 40 | return; |
|
| 41 | } |
|
| 42 | ||
| 43 | $this->indexSubtree($signal->locationId); |
|
| 44 | } |
|
| 45 | } |
|
| 46 | ||
| @@ 22-45 (lines=24) @@ | ||
| 19 | /** |
|
| 20 | * A Search Engine slot handling MoveSubtreeSignal. |
|
| 21 | */ |
|
| 22 | class MoveSubtree extends AbstractSubtree |
|
| 23 | { |
|
| 24 | /** |
|
| 25 | * Receive the given $signal and react on it. |
|
| 26 | * |
|
| 27 | * @param \eZ\Publish\Core\SignalSlot\Signal $signal |
|
| 28 | */ |
|
| 29 | public function receive(Signal $signal) |
|
| 30 | { |
|
| 31 | if (!$signal instanceof Signal\LocationService\MoveSubtreeSignal || !$this->canIndex()) { |
|
| 32 | return; |
|
| 33 | } |
|
| 34 | ||
| 35 | if ( |
|
| 36 | $this->searchHandler instanceof FullTextIndexing && |
|
| 37 | !$this->searchHandler instanceof ContentIndexing && |
|
| 38 | !$this->searchHandler instanceof LocationIndexing |
|
| 39 | ) { |
|
| 40 | return; |
|
| 41 | } |
|
| 42 | ||
| 43 | $this->indexSubtree($signal->locationId); |
|
| 44 | } |
|
| 45 | } |
|
| 46 | ||
| @@ 22-45 (lines=24) @@ | ||
| 19 | /** |
|
| 20 | * A Search Engine slot handling UnhideLocationSignal. |
|
| 21 | */ |
|
| 22 | class UnhideLocation extends AbstractSubtree |
|
| 23 | { |
|
| 24 | /** |
|
| 25 | * Receive the given $signal and react on it. |
|
| 26 | * |
|
| 27 | * @param \eZ\Publish\Core\SignalSlot\Signal $signal |
|
| 28 | */ |
|
| 29 | public function receive(Signal $signal) |
|
| 30 | { |
|
| 31 | if (!$signal instanceof Signal\LocationService\UnhideLocationSignal || !$this->canIndex()) { |
|
| 32 | return; |
|
| 33 | } |
|
| 34 | ||
| 35 | if ( |
|
| 36 | $this->searchHandler instanceof FullTextIndexing && |
|
| 37 | !$this->searchHandler instanceof ContentIndexing && |
|
| 38 | !$this->searchHandler instanceof LocationIndexing |
|
| 39 | ) { |
|
| 40 | return; |
|
| 41 | } |
|
| 42 | ||
| 43 | $this->indexSubtree($signal->locationId); |
|
| 44 | } |
|
| 45 | } |
|
| 46 | ||