} // END - if
// At least the group name should be set
- if ((empty($groupId)) && (!$this->ifGroupOpenedPreviously())) {
+ if ((empty($groupId)) && ($this->ifGroupOpenedPreviously() === false)) {
// Throw exception here
throw new EmptyVariableException(array($this, 'groupId'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
} elseif (empty($groupId)) {
}
// Same group to open?
- if ((!$this->ifGroupOpenedPreviously()) && ($groupId == $this->getPreviousGroupId())) {
+ if (($this->ifGroupOpenedPreviously() === false) && ($groupId === $this->getPreviousGroupId())) {
// Abort here silently
return false;
} // END - if
$content = " </div>\n</div><!-- Group - CLOSE //-->";
// Is this group opened?
- if (!$this->ifGroupOpenedPreviously()) {
+ if ($this->ifGroupOpenedPreviously() === false) {
// Begin the div/span blocks
$content = sprintf("<!-- Group %s - OPEN //-->
<div class=\"group_box\" id=\"%s_group_box\">
);
// Switch the state
- $this->openGroupByIdContent($groupId, $content);
+ $this->openGroupByIdContent($groupId, $content, "div");
} else {
// Is a sub group opened?
if ($this->ifSubGroupOpenedPreviously()) {
*/
public function addFormSubGroup ($subGroupId = "", $subGroupText = "") {
// Is a group opened?
- if (!$this->ifGroupOpenedPreviously()) {
+ if ($this->ifGroupOpenedPreviously() === false) {
// Throw exception here
throw new FormFormClosedException(array($this, $subGroupId), self::EXCEPTION_UNEXPECTED_CLOSED_GROUP);
} // END - if
// At least the sub group name should be set
- if ((empty($subGroupId)) && (!$this->ifSubGroupOpenedPreviously())) {
+ if ((empty($subGroupId)) && ($this->ifSubGroupOpenedPreviously() === false)) {
// Throw exception here
throw new EmptyVariableException(array($this, 'subGroupId'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
} elseif (empty($subGroupId)) {
}
// Same sub group to open?
- if ((!$this->ifSubGroupOpenedPreviously()) && ($subGroupId == $this->getPreviousSubGroupId())) {
+ if (($this->ifSubGroupOpenedPreviously() === false) && ($subGroupId == $this->getPreviousSubGroupId())) {
// Abort here silently
return false;
} // END - if
$content = " </div>\n</div><!-- Sub group- CLOSE //-->";
// Is this group opened?
- if (!$this->ifSubGroupOpenedPreviously()) {
+ if ($this->ifSubGroupOpenedPreviously() === false) {
// Begin the span block
$content = sprintf("<!-- Sub group %s - OPEN //-->
<div class=\"subgroup_box\" id=\"%s_subgroup_box\">
);
// Switch the state and remeber the name
- $this->openSubGroupByIdContent($subGroupId, $content);
+ $this->openSubGroupByIdContent($subGroupId, $content, "div");
} else {
// Get previous sub group id
$prevSubGroupId = $this->getPreviousSubGroupId();
} // END - if
// Shall we close or open the sub group?
- if ((!$this->ifSubGroupOpenedPreviously()) && ($this->getPreviousSubGroupId() !== $selectId)) {
+ if (($this->ifSubGroupOpenedPreviously() === false) && ($this->getPreviousSubGroupId() !== $selectId)) {
// Initialize first entry (which might be non-selectable if content is provided
if (!empty($firstEntry)) {
// Add selection around it
);
// Open the sub group
- $this->openSubGroupByIdContent($selectId, $content);
+ $this->openSubGroupByIdContent($selectId, $content, "select");
} elseif ($this->getPreviousSubGroupId() != $selectId) {
// Something went wrong!
- $this->debugInstance();
+ $this->debugInstance(__METHOD__."(): Previous sub group id {$this->getPreviousSubGroupId()} does not match current id {$selectId}.");
} else {
// Close the sub group
$this->closePreviousSubGroupByContent("</select>");
*/
public function addSelectSubOption ($subName, $subValue) {
// Is there a sub group (shall be a selection box!)
- if (!$this->ifSubGroupOpenedPreviously()) {
+ if ($this->ifSubGroupOpenedPreviously() === false) {
// Then throw an exception here
throw new HelperNoPreviousOpenedSubGroupException(array($this, $content), self::EXCEPTION_NO_PREVIOUS_SUB_GROUP_OPENED);
} // END - if
*/
public function addSelectOption ($optionName, $optionValue) {
// Is there a sub group (shall be a selection box!)
- if (!$this->ifSubGroupOpenedPreviously()) {
+ if ($this->ifSubGroupOpenedPreviously() === false) {
// Then throw an exception here
throw new HelperNoPreviousOpenedSubGroupException(array($this, $content), self::EXCEPTION_NO_PREVIOUS_SUB_GROUP_OPENED);
} // END - if