function RecipeCommand::toPlainString

Same name and namespace in other branches
  1. 10 core/lib/Drupal/Core/Recipe/RecipeCommand.php \Drupal\Core\Recipe\RecipeCommand::toPlainString()

Converts a stringable like TranslatableMarkup to a plain text string.

Parameters

\Stringable|string $text: The string to convert.

Return value

string The plain text string.

1 call to RecipeCommand::toPlainString()
RecipeCommand::execute in core/lib/Drupal/Core/Recipe/RecipeCommand.php

File

core/lib/Drupal/Core/Recipe/RecipeCommand.php, line 149

Class

RecipeCommand
Applies recipe.

Namespace

Drupal\Core\Recipe

Code

private function toPlainString(\Stringable|string $text) : string {
    return PlainTextOutput::renderFromHtml((string) $text);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.