Prepare tooltip attrs.

@param Helper $helper
@param array $options
@param string $tooltip
@return array
435613
protected function _prepareTooltip(Helper $helper, array $options, $tooltip)
    {
        $_options = [
            'data-position' => 'top'
        ];

        if (Arr::key('tooltipPos', $options)) {
            $_options['data-position'] = (string) $options['tooltipPos'];
            unset($options['tooltipPos']);
        }

        $options = $this->_tooltipTitle($options, $tooltip);
        $options = $this->_dataTooltip($options, $tooltip);
        $options = $helper->addClass($options, 'hasTooltip');

        return Hash::merge($_options, $options);
    }
39047
function operatorTemplateHints()
    {
        $hints = array(
            $this->LocaleName      => array( 'input' => true, 'output' => true, 'parameters' => true,
                                             'transform-parameters' => true, 'input-as-parameter' => 'always',
                                             'element-transformation' => true,
                                             'element-transformation-func' => 'l10nTransformation' ),
            $this->LocaleFetchName      => array( 'input' => true, 'output' => true, 'parameters' => true,
                                                  'transform-parameters' => true, 'input-as-parameter' => 'always',
                                                  'element-transformation' => false ),
            $this->DateTimeName    => array( 'input' => true, 'output' => true, 'parameters' => true,
                                             'transform-parameters' => true, 'input-as-parameter' => 'always',
                                             'element-transformation' => true,
                                             'element-transformation-func' => 'dateTimeTransformation' ),
            $this->CurrentDateName => array( 'input' => false, 'output' => true, 'parameters' => false,
                                             'transform-parameters' => true, 'input-as-parameter' => false,
                                             'element-transformation' => true,
                                             'element-transformation-func' => 'currentDateTransformation' ),
            $this->MakeTimeName    => array( 'input' => true, 'output' => true, 'parameters' => true,
                                             'transform-parameters' => true, 'input-as-parameter' => false,
                                             'element-transformation' => true,
                                             'element-transformation-func' => 'makeDateTimeTransformation' ),
            $this->MakeDateName    => array( 'input' => true, 'output' => true, 'parameters' => true,
                                             'transform-parameters' => true, 'input-as-parameter' => false,
                                             'element-transformation' => true,
                                             'element-transformation-func' => 'makeDateTimeTransformation' ),
            $this->GetTimeName     => array( 'input' => true, 'output' => true, 'parameters' => 1,
                                             'transform-parameters' => true, 'input-as-parameter' => false,
                                             'element-transformation' => true,
                                             'element-transformation-func' => 'getTimeTransformation' )
        );
        return $hints;
    }
1314088
protected static function generateWithTooltip($value, $title, array $attributes = [])
    {
        $attributes['data-toggle']         = 'tooltip';
        $attributes['data-original-title'] = $title;

        return static::generate($value, $attributes);
    }
798497
public function suggest($suggester, $options = [])
    {
        if (empty($suggester)) {
            $suggester = '{}';
        }
        if (is_array($suggester)) {
            $suggester = Json::encode($suggester);
        }
        $url = [
            $this->index !== null ? $this->index : '_all',
            '_suggest'
        ];

        return $this->db->post($url, array_merge($this->options, $options), $suggester);
    }
618601
function tooltip() {
    var _this6 = this;

    var options = this.options,
        tooltipBox = this.tooltipBox,
        imageData = this.imageData;


    if (!this.viewed || this.played || !options.tooltip) {
      return this;
    }

    tooltipBox.textContent = Math.round(imageData.ratio * 100) + '%';

    if (!this.tooltipping) {
      if (options.transition) {
        if (this.fading) {
          dispatchEvent(tooltipBox, EVENT_TRANSITION_END);
        }

        addClass(tooltipBox, CLASS_SHOW);
        addClass(tooltipBox, CLASS_FADE);
        addClass(tooltipBox, CLASS_TRANSITION);

        // Force reflow to enable CSS3 transition
        // eslint-disable-next-line
        tooltipBox.offsetWidth;
        addClass(tooltipBox, CLASS_IN);
      } else {
        addClass(tooltipBox, CLASS_SHOW);
      }
    } else {
      clearTimeout(this.tooltipping);
    }

    this.tooltipping = setTimeout(function () {
      if (options.transition) {
        addListener(tooltipBox, EVENT_TRANSITION_END, function () {
          removeClass(tooltipBox, CLASS_SHOW);
          removeClass(tooltipBox, CLASS_FADE);
          removeClass(tooltipBox, CLASS_TRANSITION);
          _this6.fading = false;
        }, {
          once: true
        });

        removeClass(tooltipBox, CLASS_IN);
        _this6.fading = true;
      } else {
        removeClass(tooltipBox, CLASS_SHOW);
      }

      _this6.tooltipping = false;
    }, 1000);

    return this;
  }
1207091
protected function _createIcon(HtmlHelper $html, $title, array $options = [])
    {
        list($options, $iconOptions) = $this->_createIconAttr($options);

        if (Arr::key('createIcon', $iconOptions)) {
            unset($iconOptions['createIcon']);
            $title = $html->icon($options['icon'], $iconOptions) . PHP_EOL . $title;
            unset($options['icon']);
        }

        if (Arr::key('iconInline', $options)) {
            unset($options['iconInline']);
        }

        return [$title, $options];
    }
615593
function showTooltipBind() {
              if (hasEnableExp && !scope.$eval(attrs[prefix + 'Enable'])) {
                return;
              }

              cancelHide();
              prepareTooltip();

              if (ttScope.popupDelay) {
                // Do nothing if the tooltip was already scheduled to pop-up.
                // This happens if show is triggered multiple times before any hide is triggered.
                if (!showTimeout) {
                  showTimeout = $timeout(show, ttScope.popupDelay, false);
                }
              } else {
                show();
              }
            }
456680
def show_tooltip(self, pos, tooltip, _sender_deco=None):
        
        if _sender_deco is not None and _sender_deco not in self.decorations:
            return
        QtWidgets.QToolTip.showText(pos, tooltip[0: 1024], self)
1009594
function _handleAddTooltip(tooltipType) {
    let initString = getCurrentConfig();
    let tooltipInitString = tooltipConfigs[tooltipType].initString;
    initString = initString.concat(tooltipInitString);
    configEditor.setValue(prettifyInitString(initString));
    setNewChart();
}
959718
public function addAttribute($attribute, $value, $options = [])
    {
        $span = $this->getSpan($options);
        $span->addAttribute($attribute, $value);
    }
239816
public function highlight($text, array $options = []) {
		$options += $this->_config;

		$text = $this->_prepare($text);

		if ($options['escape'] !== false) {
			$text = h($text);
		}

		$attr = ['class' => $options['prefix'] . $options['lang']];

		$options['attr'] = $this->templater()->formatAttributes($attr);
		$options['content'] = $text;

		return $this->templater()->format('code', $options);
	}
437180
protected function _getToolTipAttr(array $options = [], $toggle = 'tooltip')
    {
        if (Arr::key('tooltip', $options)) {
            $tooltip = $options['tooltip'];
            unset($options['tooltip']);

            if (is_callable($this->getConfig('prepareTooltip'))) {
                return (array) call_user_func($this->getConfig('prepareTooltip'), $this, $options, $tooltip);
            }

            $_options = [
                'data-toggle'    => $toggle,
                'data-placement' => 'top',
            ];

            if (Arr::key('tooltipPos', $options)) {
                $_options['data-placement'] = (string) $options['tooltipPos'];
                unset($options['tooltipPos']);
            }

            $options = $this->_setTooltipTitle($tooltip, $options);

            return Hash::merge($_options, $options);
        }

        return $options;
    }
890233
public function setValidator($validator, array $options = null) {
		if ($validator instanceof ZendValidatorInterface) {
			$this->validator = $validator;
		}
		else if (is_string($validator)) {
			$class = 'Zend_Validate_' . ucfirst($validator);
			
			if ($options === null) {
				$this->validator = new $class();
			} else {
				$this->validator = new $class($options);
			}
		}
		else {
			throw new ValidationFailure('Invalid Zend validator definition');
		}
	}
431425
function() {
			
			// note: we wrap with a .tooltipster-box div to be able to set a margin on it
			// (.tooltipster-base must not have one)
			var $html = $(
				'<div class="tooltipster-base tooltipster-sidetip">' +
					'<div class="tooltipster-box">' +
						'<div class="tooltipster-content"></div>' +
					'</div>' +
					'<div class="tooltipster-arrow">' +
						'<div class="tooltipster-arrow-uncropped">' +
							'<div class="tooltipster-arrow-border"></div>' +
							'<div class="tooltipster-arrow-background"></div>' +
						'</div>' +
					'</div>' +
				'</div>'
			);
			
			// hide arrow if asked
			if (!this.__options.arrow) {
				$html
					.find('.tooltipster-box')
						.css('margin', 0)
						.end()
					.find('.tooltipster-arrow')
						.hide();
			}
			
			// apply min/max width if asked
			if (this.__options.minWidth) {
				$html.css('min-width', this.__options.minWidth + 'px');
			}
			if (this.__options.maxWidth) {
				$html.css('max-width', this.__options.maxWidth + 'px');
			}
			
			this.__instance._$tooltip = $html;
			
			// tell the instance that the tooltip element has been created
			this.__instance._trigger('created');
		}
723194
public function getTooltipEllipsisSettings($param) {
        $param_arr = json_decode($param, true);
        $msg_array = array();
        foreach ($this->xmlContent as $msg) {
            if ($msg->getAttribute('uicomponent') == 'tooltip_ellipsis' &&
                    $msg->getAttribute('targetcontroller') == $param_arr['targetcontroller'] &&
                    $msg->getAttribute('targetaction') == $param_arr['targetaction']
            ) {
                $msg_array = array('charlimit' => $msg->getAttribute('charlimit'), 'placement' => $msg->getAttribute('placement'));
            }
        }

        return $msg_array;
    }
1224268
public static function link($title, $url, array $options = [])
    {
        $toolbar = Toolbar::getInstance(self::$_toolbar);
        $options += [
            'icon'   => 'link',
            'button' => 'grey lighten-3'
        ];

        $toolbar->appendButton('Core.link', $title, $url, $options);
    }
423770
public function createHelper($helper, array $config = array())
    {
        if(is_string($helper) && strpos($helper, '.') === false )
        {
            $identifier = $this->getIdentifier()->toArray();
            $identifier['name'] = $helper;
        }
        else $identifier = $helper;

        //Create the template helper
        $helper = $this->getObject($identifier, $config);

        //Check the helper interface
        if (!($helper instanceof TemplateHelperInterface))
        {
            throw new \UnexpectedValueException(
                "Template helper $identifier does not implement TemplateHelperInterface"
            );
        }

        return $helper;
    }