-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EZP-31113: AssignSectionToSubtreeSignal is not handled by search and …
…HTTP cache (#106) * Added missing header * Added missing slot definition * Fixed incorrect parent class * Update for 1.0
- Loading branch information
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/SignalSlot/SectionService/AssignSectionToSubtreeSlot.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
/** | ||
* @copyright Copyright (C) eZ Systems AS. All rights reserved. | ||
* @license For full copyright and license information view LICENSE file distributed with this source code. | ||
*/ | ||
namespace EzSystems\PlatformHttpCacheBundle\SignalSlot\SectionService; | ||
|
||
use eZ\Publish\Core\SignalSlot\Signal; | ||
use EzSystems\PlatformHttpCacheBundle\SignalSlot\AbstractContentSlot; | ||
|
||
/** | ||
* A slot handling AssignSectionToSubtreeSignal. | ||
*/ | ||
class AssignSectionToSubtreeSlot extends AbstractContentSlot | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
protected function supports(Signal $signal) | ||
{ | ||
return $signal instanceof Signal\SectionService\AssignSectionToSubtreeSignal; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
protected function generateTags(Signal $signal) | ||
{ | ||
$tags = parent::generateTags($signal); | ||
$tags[] = 'p' . $signal->locationId; | ||
|
||
return $tags; | ||
} | ||
} |