public function __isset($key) { if (parent::__isset($key)) { return true; } return isset($this->settings[$key]); }
/** * Ensures that isset() and empty() work for this classes properties. * * See the Page::issetHas property which can be set to adjust the behavior of this function. * */ public function __isset($key) { if (isset($this->settings[$key])) { return true; } if (self::$issetHas && $this->template && $this->template->fieldgroup->hasField($key)) { return true; } return parent::__isset($key); }
/** * Ensures that isset() and empty() work for this classes properties. * * See the Page::issetHas property which can be set to adjust the behavior of this function. * * @param string $key * @return bool * */ public function __isset($key) { if (isset($this->settings[$key])) { return true; } $natives = array('template', 'parent', 'createdUser', 'modifiedUser'); if (in_array($key, $natives)) { return $this->{$key} ? true : false; } if (self::$issetHas && $this->template && $this->template->fieldgroup->hasField($key)) { return true; } return parent::__isset($key); }