Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
PageObject.php
Go to the documentation of this file.
1 <?php
8 
11 
16 {
17  const ADMIN_AREA = 'admin';
18 
24  private $name;
25 
31  private $url;
32 
38  private $module;
39 
45  private $parameterized;
46 
52  private $sectionNames = [];
53 
59  private $area;
60 
70  public function __construct($name, $url, $module, $sections, $parameterized, $area)
71  {
72  $this->name = $name;
73  $this->url = $url;
74  $this->module = $module;
75  $this->sectionNames = $sections;
76  $this->parameterized = $parameterized;
77  $this->area = $area;
78  }
79 
85  public function getName()
86  {
87  return $this->name;
88  }
89 
95  public function getUrl()
96  {
97  return $this->url;
98  }
99 
105  public function getModule()
106  {
107  return $this->module;
108  }
109 
115  public function getArea()
116  {
117  return $this->area;
118  }
119 
125  public function getSectionNames()
126  {
127  return $this->sectionNames;
128  }
129 
136  public function hasSection($sectionName)
137  {
138  return in_array($sectionName, $this->sectionNames);
139  }
140 
148  public function getSection($sectionName)
149  {
150  if ($this->hasSection($sectionName)) {
151  return SectionObjectHandler::getInstance()->getObject($sectionName);
152  }
153 
154  return null;
155  }
156 
162  public function isParameterized()
163  {
164  return $this->parameterized;
165  }
166 }
__construct($name, $url, $module, $sections, $parameterized, $area)
Definition: PageObject.php:70