TooltipSetterTrait::setTooltip

@param string $text
@param string $placement

@return static
480970
public function setTooltip($text, $placement = 'right')
    {
        $placement = in_array($placement, ['top', 'bottom', 'left', 'right']) ? $placement : 'right';

        $this->attributes->addAttribute('data-toggle', 'tooltip');
        $this->attributes->addAttribute('data-placement', $placement);
        $this->attributes->addAttribute('title', $text);

        return $this;
    }
289246
public static function set(HTMLHandlerInterface $HTMLHandler, DOMNode $HTMLElement, $content, $delay = 0, $position = '')
    {
        // Set tooltip attribute array
        $tooltip = [
            'content' => $content,
            'delay' => $delay,
            'position' => $position,
        ];

        $HTMLHandler->data($HTMLElement, 'ui-tooltip', $tooltip);
    }
1146702
public function setTopic($text)
    {
        return $this->client->apiCall('channels.setTopic', [
            'channel' => $this->getId(),
            'topic' => $text,
        ])->then(function () use ($text) {
            $this->data['topic']['value'] = $text;
            return $text;
        });
    }
571244
public function addPlaceholder($text, $isPlain = true, $lang = 'en')
    {
        $value = '__placeholder';

        $this->placeholders[$lang] = new Label($text, $this->getLocaleKey('_placeholder'), $isPlain, $lang, $this->name . $value);
    }
760464
public function getUntilStop($text)
    {
        $pos = stripos($text, "<!--stop-->");
        if ($pos) {
            $text = substr($text, 0, $pos);
        }
        return $text;
    }
841591
public function addText($text)
    {
        $currentDescription = $this->project->getDescription();
        if ($currentDescription === null) {
            $this->project->setDescription($text);
        } else {
            $this->project->setDescription($currentDescription . $text);
        }
    }
32501
public static void copyToClipboard(String text) {
		final StringSelection stringSelection = new StringSelection(text);
		final Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
		clipboard.setContents(stringSelection, stringSelection);
	}
346833
public final void setPlaceholder(String text) {
        if (!text.equalsIgnoreCase(mText)) {
            setPlaceholderTextInternal(text, mTextColor, mTextSize, true);
        }
    }
1332126
public function setText($text)
    {
        if (!is_string($text)) {
            throw new InvalidArgumentException('string', 0);
        }

        $text = trim($text);

        if (strpos($text, '#') !== 0) {
            $text = '# ' . $text;
        }

        $this->text = $text;

        return $this;
    }
1069449
def set_placeholder(self, text):
        
        if self._placeholder != text:
            self._placeholder = text
            if not self.hasFocus():
                self.update()
1199190
public function tag($name, $text = null, array $options = [])
    {
        $options = optionsParser($options)->tooltip();
        list($text, $options) = $this->addIconToText($text, $options);

        return parent::tag($name, is_null($text) ? '' : $text, $options->toArray());
    }
1101920
public function setFooter($text, $icon = null)
    {
        $this->data['footer'] = $text;
        if ($icon) {
            $this->data['footer_icon'] = $icon;
        }

        return $this;
    }
889045
private function set_text($text)
    {
        if(!!$text)
        {
            if(!!$this->text)
            {
                if(!!is_array($this->text))
                {
                    $this->text[] = $text;
                }
                else
                {
                    $this->text = array($this->text,$text);
                }
            }
            else
            {
                $this->text = $text;
            }
        }

        return $this;
    }
837667
def setpos(self, location, text):
        """"""
        self.location = location
        self.text = text
878876
static function markString(string $text, int $position, int $length, array $mark) : string
    {
        $text = substr_replace($text, $mark[0], $position, 0);
        $text = substr_replace($text, $mark[1], $position + $length + strlen($mark[0]), 0);

        return $text;
    }
748364
public function assertDontSeeIn($selector, $text)
    {
        $fullSelector = $this->resolver->format($selector);

        $element = $this->resolver->findOrFail($selector);

        PHPUnit::assertFalse(
            Str::contains($element->getText(), $text),
            "Saw unexpected text [{$text}] within element [{$fullSelector}]."
        );

        return $this;
    }
1056847
@Override
  protected void toggleTooltip(Node reference) {
    if (reference instanceof Control) {
      this.toggleTooltip(reference, (Control) reference);
    }
  }