Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Segment delegate decorator event (#10890)
* make sub-querybuilders pass paramater types along and allow to bypass decorator to get crate value * cs fixes? * tests for dynamic content * update reference to CO plugin * update reference co bundle, fix cs * fix tests, cover event dispatch with test * remove use statements from config * replace int value with constant * add argument removed on cleanup * add helper method * Fixes after wild cherry-pick conflict resolutions of antient commits * New PHP syntax suggar * CS fix * Improving tests * CS fix * CS fix * CS fix Co-authored-by: Jan Kozak <galvani78@gmail.com> Co-authored-by: Ruth Cheesley <ruth.cheesley@acquia.com>
- Loading branch information
1 parent
d4724dd
commit 2701926
Showing
11 changed files
with
192 additions
and
63 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
37 changes: 37 additions & 0 deletions
37
app/bundles/LeadBundle/Event/LeadListFiltersDecoratorDelegateEvent.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,37 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Mautic\LeadBundle\Event; | ||
|
||
use Mautic\CoreBundle\Event\CommonEvent; | ||
use Mautic\LeadBundle\Segment\ContactSegmentFilterCrate; | ||
use Mautic\LeadBundle\Segment\Decorator\FilterDecoratorInterface; | ||
|
||
final class LeadListFiltersDecoratorDelegateEvent extends CommonEvent | ||
{ | ||
private ?FilterDecoratorInterface $decorator = null; | ||
private ContactSegmentFilterCrate $crate; | ||
|
||
public function __construct(ContactSegmentFilterCrate $crate) | ||
{ | ||
$this->crate = $crate; | ||
} | ||
|
||
public function getDecorator(): ?FilterDecoratorInterface | ||
{ | ||
return $this->decorator; | ||
} | ||
|
||
public function setDecorator(FilterDecoratorInterface $decorator): self | ||
{ | ||
$this->decorator = $decorator; | ||
|
||
return $this; | ||
} | ||
|
||
public function getCrate(): ContactSegmentFilterCrate | ||
{ | ||
return $this->crate; | ||
} | ||
} |
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
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
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
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
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
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
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
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
Oops, something went wrong.