public static function YamlFormElementHelper::isTitleDisplayed in YAML Form 8
Determine if a form element's title is displayed.
Parameters
array $element: A form element.
Return value
bool TRUE if a form element's title is displayed.
3 calls to YamlFormElementHelper::isTitleDisplayed()
- template_preprocess_yamlform_element_base_html in includes/
yamlform.theme.inc - Prepares variables for form element base HTML template.
- YamlFormCompositeBase::getTableColumn in src/
Plugin/ YamlFormElement/ YamlFormCompositeBase.php - Get element's table column(s) settings.
- YamlFormLikert::getTableColumn in src/
Plugin/ YamlFormElement/ YamlFormLikert.php - Get element's table column(s) settings.
File
- src/
Utility/ YamlFormElementHelper.php, line 57
Class
- YamlFormElementHelper
- Helper class form element methods.
Namespace
Drupal\yamlform\UtilityCode
public static function isTitleDisplayed(array $element) {
return !empty($element['#title']) && (empty($element['#title_display']) || !in_array($element['#title_display'], [
'invisible',
[
'attribute',
],
])) ? TRUE : FALSE;
}