Completed
Push — signal-slots ( f9cce0...3c05c8 )
by
unknown
14:14
created

BeforeCreateContentEvent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 32
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 1

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getContentCreateStruct() 0 4 1
A getLocationCreateStructs() 0 4 1
1
<?php
2
3
/**
4
 * @copyright Copyright (C) eZ Systems AS. All rights reserved.
5
 * @license For full copyright and license information view LICENSE file distributed with this source code.
6
 */
7
declare(strict_types=1);
8
9
namespace eZ\Publish\Core\Event\Content;
10
11
use eZ\Publish\API\Repository\Values\Content\ContentCreateStruct;
12
use eZ\Publish\Core\Event\BeforeEvent;
13
14
final class BeforeCreateContentEvent extends BeforeEvent
15
{
16
    public const NAME = 'ezplatform.event.content.create.before';
17
18
    /**
19
     * @var \eZ\Publish\API\Repository\Values\Content\ContentCreateStruct
20
     */
21
    private $contentCreateStruct;
22
23
    /**
24
     * @var array
25
     */
26
    private $locationCreateStructs;
27
28
    public function __construct(
29
        ContentCreateStruct $contentCreateStruct,
30
        array $locationCreateStructs
31
    ) {
32
        $this->contentCreateStruct = $contentCreateStruct;
33
        $this->locationCreateStructs = $locationCreateStructs;
34
    }
35
36
    public function getContentCreateStruct(): ContentCreateStruct
37
    {
38
        return $this->contentCreateStruct;
39
    }
40
41
    public function getLocationCreateStructs(): array
42
    {
43
        return $this->locationCreateStructs;
44
    }
45
}
46