public static function String::placeholder

Formats text for emphasized display in a placeholder inside a sentence.

Used automatically by self::format().

Parameters

string $text: The text to format (plain-text).

Return value

string The formatted text (html).

3 calls to String::placeholder()
drupal_placeholder in drupal/core/includes/bootstrap.inc
Formats text for emphasized display in a placeholder inside a sentence.
String::format in drupal/core/lib/Drupal/Component/Utility/String.php
Formats a string for HTML display by replacing variable placeholders.
StringTest::testPlaceholder in drupal/core/tests/Drupal/Tests/Component/Utility/StringTest.php
Tests String::placeholder().

File

drupal/core/lib/Drupal/Component/Utility/String.php, line 122
Contains \Drupal\Component\Utility\String.

Class

String
Provides helpers to operate on strings.

Namespace

Drupal\Component\Utility

Code

public static function placeholder($text) {
  return '<em class="placeholder">' . static::checkPlain($text) . '</em>';
}