public static function WebformElementHelper::isTitleDisplayed in Webform 6.x
Same name and namespace in other branches
- 8.5 src/Utility/WebformElementHelper.php \Drupal\webform\Utility\WebformElementHelper::isTitleDisplayed()
Determine if a webform element's title is displayed.
Parameters
array $element: A webform element.
Return value
bool TRUE if a webform element's title is displayed.
4 calls to WebformElementHelper::isTitleDisplayed()
- WebformCompositeBase::getTableColumn in src/
Plugin/ WebformElement/ WebformCompositeBase.php - Get element's table column(s) settings.
- WebformLikert::getTableColumn in src/
Plugin/ WebformElement/ WebformLikert.php - Get element's table column(s) settings.
- WebformMapping::getTableColumn in src/
Plugin/ WebformElement/ WebformMapping.php - Get element's table column(s) settings.
- _template_progress_webform_set_title in includes/
webform.theme.template.inc - Set variables title to element #title or #admin_title.
File
- src/
Utility/ WebformElementHelper.php, line 215
Class
- WebformElementHelper
- Helper class webform element methods.
Namespace
Drupal\webform\UtilityCode
public static function isTitleDisplayed(array $element) {
return !empty($element['#title']) && (empty($element['#title_display']) || !in_array($element['#title_display'], [
'invisible',
'attribute',
])) ? TRUE : FALSE;
}