You are here

public static function WebformOptionsHelper::hasOptionDescription in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Utility/WebformOptionsHelper.php \Drupal\webform\Utility\WebformOptionsHelper::hasOptionDescription()

Determine if option text includes a description.

Parameters

string $text: Option text.

Return value

bool TRUE option text includes a description.

9 calls to WebformOptionsHelper::hasOptionDescription()
OptionsBase::formatHtmlItems in src/Plugin/WebformElement/OptionsBase.php
Format an element's items as HTML.
OptionsBase::formatTextItems in src/Plugin/WebformElement/OptionsBase.php
Format an element's items as text.
OptionsLimitWebformHandler::getOptionsLimitLabel in modules/webform_options_limit/src/Plugin/WebformHandler/OptionsLimitWebformHandler.php
Get option limit label.
WebformLikert::processWebformLikert in src/Element/WebformLikert.php
Processes a likert scale webform element.
WebformMapping::processWebformMapping in src/Element/WebformMapping.php
Processes a likert scale webform element.

... See full list

File

src/Utility/WebformOptionsHelper.php, line 93

Class

WebformOptionsHelper
Helper class webform options based methods.

Namespace

Drupal\webform\Utility

Code

public static function hasOptionDescription($text) {
  return strpos($text, WebformOptionsHelper::DESCRIPTION_DELIMITER) !== FALSE ? TRUE : FALSE;
}