Completed
Branch EDTR/master (83b47e)
by
unknown
25:37 queued 16:41
created

WordPressPluginsPageData   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 37
rs 10
c 0
b 0
f 0
wmc 2
lcom 1
cbo 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
A initialize() 0 5 1
1
<?php
2
3
namespace EventEspresso\core\domain\entities\routing\data_nodes\domains;
4
5
use EventEspresso\core\domain\services\admin\ExitModal;
6
use EventEspresso\core\services\json\JsonDataNode;
7
use EventEspresso\core\services\json\JsonDataNodeValidator;
8
9
/**
10
 * Class WordPressPluginsPageData
11
 * Description
12
 *
13
 * @package EventEspresso\core\domain\entities\routing\data_nodes\domains
14
 * @author  Brent Christensen
15
 * @since   $VID:$
16
 */
17
class WordPressPluginsPageData extends JsonDataNode
18
{
19
20
    const NODE_NAME = 'wpPluginsPage';
21
22
    /**
23
     * @var ExitModal $exit_modal
24
     */
25
    private $exit_modal;
26
27
28
    /**
29
     * WordPressPluginsPageData JsonDataNode constructor.
30
     *
31
     * @param ExitModal             $exit_modal
32
     * @param JsonDataNodeValidator $validator
33
     */
34
    public function __construct(
35
        ExitModal $exit_modal,
36
        JsonDataNodeValidator $validator
37
    ) {
38
        parent::__construct($validator);
39
        $this->exit_modal = $exit_modal;
40
        $this->setDomain(WordPressPluginsPageData::NODE_NAME);
41
        $this->setNodeName(WordPressPluginsPageData::NODE_NAME);
42
    }
43
44
45
    /**
46
     * @inheritDoc
47
     */
48
    public function initialize()
49
    {
50
        $data = $this->exit_modal->getExitSurveyInfo();
51
        $this->addData('eeExitSurveyInfo', $data);
52
    }
53
}
54