function _paragraphs_table_hidden_label in Paragraphs table 8
Hide field label.
3 calls to _paragraphs_table_hidden_label()
- _paragraphs_table_1_row in ./
paragraphs_table.module - Get table row.
- _paragraphs_table_row in ./
paragraphs_table.module - Generate table row.
- _paragraphs_table_vertical in ./
paragraphs_table.module - Make subform table vertical.
File
- ./
paragraphs_table.module, line 33 - Contains paragraphs_table.module.
Code
function _paragraphs_table_hidden_label(&$field_form) {
if (!empty($field_form['#title_display'])) {
$field_form['#title_display'] = 'invisible';
}
// Remove title field date.
if (!empty($field_form['#type'])) {
if ($field_form['#type'] == 'datetime') {
$field_form['#title'] = '';
}
if (in_array($field_form['#type'], [
'radios',
'checkboxes',
])) {
return TRUE;
}
}
// Remove fieldset field date & time.
if (!empty($field_form["#theme_wrappers"][0]) && in_array($field_form["#theme_wrappers"][0], [
'fieldset',
])) {
array_shift($field_form["#theme_wrappers"]);
}
foreach (Element::children($field_form) as $child) {
_paragraphs_table_hidden_label($field_form[$child]);
}
}