PMA\libraries\Util::showHint PHP Method

showHint() public static method

Returns HTML code for a tooltip
public static showHint ( string $message ) : string
$message string the message for the tooltip
return string
    public static function showHint($message)
    {
        if ($GLOBALS['cfg']['ShowHint']) {
            $classClause = ' class="pma_hint"';
        } else {
            $classClause = '';
        }
        return '<span' . $classClause . '>' . self::getImage('b_help.png') . '<span class="hide">' . $message . '</span>' . '</span>';
    }

Usage Example

 /**
  * Sets the import plugin properties.
  * Called in the constructor.
  *
  * @return void
  */
 protected function setProperties()
 {
     $this->_setAnalyze(false);
     if ($GLOBALS['plugin_param'] !== 'table') {
         $this->_setAnalyze(true);
     }
     $generalOptions = parent::setProperties();
     $this->properties->setText('CSV');
     $this->properties->setExtension('csv');
     if ($GLOBALS['plugin_param'] !== 'table') {
         $leaf = new BoolPropertyItem();
         $leaf->setName("col_names");
         $leaf->setText(__('The first line of the file contains the table column names' . ' <i>(if this is unchecked, the first line will become part' . ' of the data)</i>'));
         $generalOptions->addProperty($leaf);
     } else {
         $hint = new PMA\libraries\Message(__('If the data in each row of the file is not' . ' in the same order as in the database, list the corresponding' . ' column names here. Column names must be separated by commas' . ' and not enclosed in quotations.'));
         $leaf = new TextPropertyItem();
         $leaf->setName("columns");
         $leaf->setText(__('Column names: ') . PMA\libraries\Util::showHint($hint));
         $generalOptions->addProperty($leaf);
     }
     $leaf = new BoolPropertyItem();
     $leaf->setName("ignore");
     $leaf->setText(__('Do not abort on INSERT error'));
     $generalOptions->addProperty($leaf);
 }
All Usage Examples Of PMA\libraries\Util::showHint
Util