123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- <?php
- namespace Ppb\Navigation\Page;
- use Cube\Navigation\Page\AbstractPage;
- class Location extends AbstractPage
- {
-
- protected $_locationId;
-
- protected $_isoCode;
-
- public function getLocationId()
- {
- return $this->_locationId;
- }
-
- public function setLocationId($locationId)
- {
- $this->_locationId = (int) $locationId;
- return $this;
- }
-
- public function getIsoCode()
- {
- return $this->_isoCode;
- }
-
- public function setIsoCode($isoCode)
- {
- $this->_isoCode = (bool) $isoCode;
- return $this;
- }
-
- public function isActive($recursive = false)
- {
- if (!$this->_active) {
- if ($this->_id == $this->_locationId) {
- $this->_active = true;
- return true;
- }
- }
- return parent::isActive($recursive);
- }
- }
|