These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace Kunstmaan\SitemapBundle\Event; |
||
4 | |||
5 | use Doctrine\Common\Collections\ArrayCollection; |
||
6 | use Doctrine\Common\Collections\Collection; |
||
7 | use Kunstmaan\SitemapBundle\Model\SitemapUrl; |
||
8 | use Symfony\Component\EventDispatcher\Event; |
||
9 | |||
10 | final class PreSitemapRenderEvent extends Event |
||
0 ignored issues
–
show
|
|||
11 | { |
||
12 | public const NAME = 'sitemap.pre_render'; |
||
13 | |||
14 | /** @var ArrayCollection */ |
||
15 | private $extraItems; |
||
16 | |||
17 | /** @var string */ |
||
18 | private $locale; |
||
19 | |||
20 | public function __construct($locale) |
||
21 | { |
||
22 | $this->extraItems = new ArrayCollection(); |
||
23 | $this->locale = $locale; |
||
24 | } |
||
25 | |||
26 | public function getLocale(): string |
||
27 | { |
||
28 | return $this->locale; |
||
29 | } |
||
30 | |||
31 | public function getExtraItems(): Collection |
||
32 | { |
||
33 | return $this->extraItems; |
||
34 | } |
||
35 | |||
36 | public function addExtraItem(SitemapUrl $extraItem): void |
||
37 | { |
||
38 | if (!$this->extraItems->contains($extraItem)) { |
||
39 | $this->extraItems->add($extraItem); |
||
40 | } |
||
41 | } |
||
42 | } |
||
43 |
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.