Returns the region to which a row in the display overview belongs.
array $row: The row element.
string|null The region name this row belongs to.
public function getRowRegion($row) {
switch ($row['#row_type']) {
case 'field':
case 'extra_field':
return 'content';
case 'add_new_field':
// If no input in 'label', assume the row has not been dragged out of the
// 'add new' section.
return !empty($row['label']['#value']) ? 'content' : 'hidden';
}
}