PMA\libraries\Util::getDivForSliderEffect PHP Method

getDivForSliderEffect() public static method

Generates a slider effect (jQjuery) Takes care of generating the initial
and the link controlling the slider; you have to generate the
yourself after the sliding section.
public static getDivForSliderEffect ( string $id = '', string $message = '' ) : string
$id string the id of the
on which to apply the effect
$message string the message to show as a link
return string html div element
    public static function getDivForSliderEffect($id = '', $message = '')
    {
        return Template::get('div_for_slider_effect')->render(['id' => $id, 'InitialSlidersState' => $GLOBALS['cfg']['InitialSlidersState'], 'message' => $message]);
    }

Usage Example

 /**
  * Prepare option fields block
  *
  * @return  string  $options_html   html content
  *
  * @access  private
  *
  * @see     _getTableHeaders()
  */
 private function _getOptionsBlock()
 {
     $options_html = '';
     $options_html .= '<form method="post" action="sql.php" ' . 'name="displayOptionsForm"';
     $options_html .= ' class="ajax print_ignore" ';
     $options_html .= '>';
     $url_params = array('db' => $this->__get('db'), 'table' => $this->__get('table'), 'sql_query' => $this->__get('sql_query'), 'goto' => $this->__get('goto'), 'display_options_form' => 1);
     $options_html .= PMA_URL_getHiddenInputs($url_params) . '<br />' . Util::getDivForSliderEffect('', __('Options')) . '<fieldset>';
     $options_html .= '<div class="formelement">';
     $choices = array('P' => __('Partial texts'), 'F' => __('Full texts'));
     // pftext means "partial or full texts" (done to reduce line lengths)
     $options_html .= Util::getRadioFields('pftext', $choices, $_SESSION['tmpval']['pftext'], true, true, '', 'pftext_' . $this->__get('unique_id')) . '</div>';
     if ($GLOBALS['cfgRelation']['relwork'] && $GLOBALS['cfgRelation']['displaywork']) {
         $options_html .= '<div class="formelement">';
         $choices = array('K' => __('Relational key'), 'D' => __('Display column for relations'));
         $options_html .= Util::getRadioFields('relational_display', $choices, $_SESSION['tmpval']['relational_display'], true, true, '', 'relational_display_' . $this->__get('unique_id')) . '</div>';
     }
     $options_html .= '<div class="formelement">' . Util::getCheckbox('display_binary', __('Show binary contents'), !empty($_SESSION['tmpval']['display_binary']), false, 'display_binary_' . $this->__get('unique_id')) . '<br />' . Util::getCheckbox('display_blob', __('Show BLOB contents'), !empty($_SESSION['tmpval']['display_blob']), false, 'display_blob_' . $this->__get('unique_id')) . '</div>';
     // I would have preferred to name this "display_transformation".
     // This is the only way I found to be able to keep this setting sticky
     // per SQL query, and at the same time have a default that displays
     // the transformations.
     $options_html .= '<div class="formelement">' . Util::getCheckbox('hide_transformation', __('Hide browser transformation'), !empty($_SESSION['tmpval']['hide_transformation']), false, 'hide_transformation_' . $this->__get('unique_id')) . '</div>';
     $options_html .= '<div class="formelement">';
     $choices = array('GEOM' => __('Geometry'), 'WKT' => __('Well Known Text'), 'WKB' => __('Well Known Binary'));
     $options_html .= Util::getRadioFields('geoOption', $choices, $_SESSION['tmpval']['geoOption'], true, true, '', 'geoOption_' . $this->__get('unique_id'));
     $options_html .= '</div>';
     $options_html .= '<div class="clearfloat"></div>' . '</fieldset>';
     $options_html .= '<fieldset class="tblFooters">' . '<input type="submit" value="' . __('Go') . '" />' . '</fieldset>' . '</div>' . '</form>';
     return $options_html;
 }
Util