public static function ListFormatter::prepareFieldListInfo in Text list formatter 8.2
Returns an array of info to add to hook_field_formatter_info_alter().
This iterates through each item returned from fieldListInfo.
Return value
array An array of fields and settings from hook_textformatter_field_info data implementations. Containing an aggregated array from all items.
1 call to ListFormatter::prepareFieldListInfo()
File
- lib/
Drupal/ textformatter/ Plugin/ field/ formatter/ ListFormatter.php, line 287 - Definition of Drupal\textformatter\Plugin\field\formatter\List;
Class
- ListFormatter
- Plugin implementation of the 'text_default' formatter.
Namespace
Drupal\textformatter\Plugin\field\formatterCode
public static function prepareFieldListInfo() {
$textformatter_info = self::fieldListInfo();
$field_info = array(
'fields' => array(),
'settings' => array(),
);
// Create array of all field types and default settings.
foreach ($textformatter_info as $module => $info) {
$info += array(
'fields' => array(),
'settings' => array(),
);
$field_info['fields'] = array_merge($field_info['fields'], $info['fields']);
$field_info['settings'] = array_merge($field_info['settings'], $info['settings']);
}
return $field_info;
}