+ public function addSelectSubOption ($subName, $subValue) {
+ // Is there a sub group (shall be a selection box!)
+ if (!$this->ifSubGroupOpenedPreviously()) {
+ // Then throw an exception here
+ throw new HelperNoPreviousOpenedSubGroupException(array($this, $content), self::EXCEPTION_NO_PREVIOUS_SUB_GROUP_OPENED);
+ } // END - if
+
+ // Render the content
+ $content = sprintf("<option name=\"%s\" class=\"suboption suboption_%s\" disabled=\"disabled\">%s</option>\n",
+ $subName,
+ $subName,
+ $subValue
+ );
+
+ // Add the content to the previously opened sub group
+ $this->addContentToPreviousGroup($content);
+ }
+
+ /**
+ * Adds a selectable option to a previously added selection box. This method
+ * does *not* validate if there is already a sub option added with the same
+ * name. We need to finish this here!
+ *
+ * @param $optionName Name of the sub action
+ * @param $optionValue Value of the sub action
+ * @return void
+ * @throws HelperNoPreviousOpenedSubGroupException If no previously opened sub group was found
+ * @todo Add checking if sub option is already added
+ */
+ public function addSelectOption ($optionName, $optionValue) {
+ // Is there a sub group (shall be a selection box!)
+ if (!$this->ifSubGroupOpenedPreviously()) {
+ // Then throw an exception here
+ throw new HelperNoPreviousOpenedSubGroupException(array($this, $content), self::EXCEPTION_NO_PREVIOUS_SUB_GROUP_OPENED);
+ } // END - if
+
+ // Render the content
+ $content = sprintf("<option name=\"%s\" class=\"option option_%s\">%s</option>\n",
+ $optionName,
+ $optionName,
+ $optionValue
+ );
+
+ // Add the content to the previously opened sub group
+ $this->addContentToPreviousGroup($content);