/** * * operate the field with the contorls */ protected function operateControlStates() { $arrState = UniteControlsRev::getState($this->fieldname); if ($arrState["found"] == true) { $this->disabled = $arrState["disabled"]; $this->hidden = $arrState["hidden"]; } }
/** * * put custom field - slide link */ public function putSlideLinkField($isLayer = false) { if ($isLayer == true) { //layer option $name = "layer_slide_link"; $state = array("found" => false); $defaultValue = ""; $rowID = $name . "_row"; $selectID = $name; } else { //slide option $name = "slide_link"; $state = UniteControlsRev::getState($name); $state = UniteControlsRev::getState($name); $defaultValue = $this->params->get($name); $rowID = $name . "-li"; $selectID = "jform_params_{$name}"; } $arrSlides = array(); $arrSlides["nothing"] = "-- Not Chosen --"; $arrSlides["next"] = "-- Next Slide --"; $arrSlides["prev"] = "-- Previous Slide --"; //dmp($this->arrSlides);exit(); foreach ($this->arrSlides as $key => $value) { $arrSlides[$key] = $value; } $this->arrSlidesForLink = $arrSlides; $style = ""; $disabled = ""; $class = ""; if ($state["found"] == true) { if ($state["hidden"] == true) { $style = " style='display:none;' "; } if ($state["disabled"] == true) { $disabled = " disabled='disabled'"; $class = "field_disabled"; } } $htmlParams = ' id="' . $selectID . '" class="" name="jform[params][' . $name . ']" aria-invalid="false" ' . $style . $disabled; $htmlSelect = UniteFunctionsRev::getHTMLSelect($arrSlides, $defaultValue, ' ' . $htmlParams, true); echo "<li id='{$rowID}'>"; ?> <label id="jform_params_slide_link-lbl" class="hasTip <?php echo $class; ?> " title="Link To Slide::Choose a slide that this slide will be link to." for="jform_params_slide_link" aria-invalid="false" <?php echo $style; ?> >Link To Slide</label> <?php echo $htmlSelect; ?> <?php echo "</li>"; }