Setup tooltip data-tooltip attr.

@param   array $options
@param   string $tooltip
@return  array
359471
protected function _dataTooltip(array $options, $tooltip)
    {
        if (Arr::key('title', $options)) {
            $options['data-tooltip'] = $options['title'];
        }

        if (is_string($tooltip)) {
            $options['data-tooltip'] = $tooltip;
        }

        return $options;
    }
1195659
public function setOptions($options = [])
    {
        $this->options = $options;
        $this->debug->info(__FUNCTION__, 'setOptions: ', $this->options);

        return $this;
    }
886563
def itooltip(title, icon_suffix = 'info-circle', html_options = {})
      html_options[:title] = title
      (html_options[:data] ||= {}).merge! toggle: 'tooltip', placement: 'top'

      fa_icon icon_suffix, html_options
    end
109542
public function addAttribute($attribute, $value, $options = [])
    {
        $this->tracer->addAttribute($attribute, $value, $options);
    }
617708
function (element, options) {
    this.type       =
    this.options    =
    this.enabled    =
    this.timeout    =
    this.hoverState =
    this.$element   = null

    this.init('tooltip', element, options)
  }
547078
protected function renderTooltip(TooltipInterface $tooltip)
    {
        $options = array(
            'enabled' => $tooltip->isEnabled(),
        );

        if (0 < count($tooltip->getStyles())) {
            $options['style'] = $tooltip->getStyles();
        }

        return $options;
    }
452320
public function prepareAttributes($options)
    {
        if (!$options) {
            return null;
        }

        $attributes = [];

        foreach ($options as $name => $option) {
            if ($option !== null) {
                $name = is_numeric($name) ? $option : $name;
                $attributes[] = $name.'="'.$option.'" ';
            }
        }

        return join('', $attributes);
    }
1077659
public function setOptions(array $options) {
		if(isset($options['data_type']))
			$this->data_type = $options['data_type'];
		if(isset($options['default']))
			$this->value = $options['default'];
		if(isset($options['widget']))
			$this->widget = $options['widget'];

		$this->options = array_merge_recursive($this->options, $options);

		return $this;
	}
641360
protected function prepareOptions(array $options = [])
    {
        $helper = $this->formHelper;
        $rulesParser = $helper->createRulesParser($this);
        $rules = $this->getOption('rules');
        $parsedRules = $rules ? $rulesParser->parse($rules) : [];

        $this->options = $helper->mergeOptions($this->options, $options);

        foreach (['attr', 'label_attr', 'wrapper'] as $appendable) {
            // Append values to the 'class' attribute
            if ($this->getOption("{$appendable}.class_append")) {
                // Combine the current class attribute with the appends
                $append = $this->getOption("{$appendable}.class_append");
                $classAttribute = $this->getOption("{$appendable}.class", '').' '.$append;
                $this->setOption("{$appendable}.class", $classAttribute);

                // Then remove the class_append option to prevent it from showing up as an attribute in the HTML
                $this->setOption("{$appendable}.class_append", null);
            }
        }

        if ($this->getOption('attr.multiple') && !$this->getOption('tmp.multipleBracesSet')) {
            $this->name = $this->name.'[]';
            $this->setOption('tmp.multipleBracesSet', true);
        }

        if ($this->parent->haveErrorsEnabled()) {
            $this->addErrorClass();
        }

        if ($this->getOption('required') === true || isset($parsedRules['required'])) {
            $lblClass = $this->getOption('label_attr.class', '');
            $requiredClass = $this->getConfig('defaults.required_class', 'required');

            if (! Str::contains($lblClass, $requiredClass)) {
                $lblClass .= ' '.$requiredClass;
                $this->setOption('label_attr.class', $lblClass);
            }

            if ($this->parent->clientValidationEnabled()) {
                $this->setOption('attr.required', 'required');
            }
        }

        if ($this->parent->clientValidationEnabled() && $parsedRules) {
            $attrs = $this->getOption('attr') + $parsedRules;
            $this->setOption('attr', $attrs);
        }

        $this->setOption('wrapperAttrs', $helper->prepareAttributes($this->getOption('wrapper')));
        $this->setOption('errorAttrs', $helper->prepareAttributes($this->getOption('errors')));

        if ($this->getOption('help_block.text')) {
            $this->setOption(
                'help_block.helpBlockAttrs',
                $helper->prepareAttributes($this->getOption('help_block.attr'))
            );
        }

        return $this->options;
    }
1358786
public function setSelectOptions($attr, $options = null)
    {
        $optionsList = is_array($attr)
            ? $attr
            : [$attr => $options];

        foreach ($optionsList as $key => $value)
            $this->selectOptions[$key] = $value;

        return $this;
    }
530146
public function set_option($options = array()) {
        $options['issuerid'] = clean_param($options['issuerid'], PARAM_INT);
        $options['controlledlinkfoldername'] = clean_param($options['controlledlinkfoldername'], PARAM_TEXT);

        $ret = parent::set_option($options);
        return $ret;
    }
1314088
protected static function generateWithTooltip($value, $title, array $attributes = [])
    {
        $attributes['data-toggle']         = 'tooltip';
        $attributes['data-original-title'] = $title;

        return static::generate($value, $attributes);
    }
731225
public function setOptions(array $options = [], $reset = false)
    {
        $element = current($options);
        //jeśli element jest ustawiony
        if ($element instanceof \Mmi\Form\Element\Checkbox) {
            $this->setElement($element);
        }
        return $this->setMessage(next($options));
    }
715328
public function setOptions(array $options): Control
    {
        if (array_key_exists('name', $options)) {
            $this->setName($options['name']);
        }

        if (array_key_exists('classes', $options)) {
            $this->addClasses(...(array)$options['classes']);
        }

        if (array_key_exists('rule', $options)) {
            $this->setRule($options['rule']);
        }

        if (array_key_exists('value', $options)) {
            $this->setValue((string)$options['value']);
        }

        if (array_key_exists('messages', $options)) {
            $this->setMessages($options['messages']);
        }

        if (array_key_exists('label', $options)) {
            $this->setLabel($options['label']);
        }

        if (array_key_exists('attributes', $options)) {
            $this->addAttributes((array)$options['attributes']);
        }

        if (array_key_exists('group', $options)) {
            $this->setGroup($options['group']);
        } else {
            $this->setGroup('*');
        }

        $this->options = $options;

        return $this;
    }
504467
function tooltipContent( $content ) {

		global $id; // This is the Post ID, [@see WP_Query::setup_postdata, ...]

		if ( ! empty( $this->glossaryTerms ) && isset( $this->glossaryTerms[ $id ] ) ) {
			$glossary_terms = $this->glossaryTerms[ $id ];
		} else {
			return $content;
		}

		$content .= '<div class="glossary">';

		foreach ( $glossary_terms as $glossary_term_id => $glossary_term ) {
			$identifier = "$id-$glossary_term_id";
			$content .= '<div class="glossary__tooltip" id="' . $identifier . '" hidden>' . wpautop( $glossary_term ) . '</div>';
		}

		$content .= '</div>';

		return $content;
	}
496533
def see_tooltip(step, tooltip):
    
    elem = world.browser.find_elements_by_xpath(str(
        '//*[@title="%(tooltip)s" or @data-original-title="%(tooltip)s"]' %
        dict(tooltip=tooltip)))
    elem = [e for e in elem if e.is_displayed()]
    assert_true(step, elem)
959718
public function addAttribute($attribute, $value, $options = [])
    {
        $span = $this->getSpan($options);
        $span->addAttribute($attribute, $value);
    }