function ItemList::getString
Same name in other branches
- 9 core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php \Drupal\Core\TypedData\Plugin\DataType\ItemList::getString()
- 10 core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php \Drupal\Core\TypedData\Plugin\DataType\ItemList::getString()
- 11.x core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php \Drupal\Core\TypedData\Plugin\DataType\ItemList::getString()
Overrides TypedData::getString
File
-
core/
lib/ Drupal/ Core/ TypedData/ Plugin/ DataType/ ItemList.php, line 84
Class
- ItemList
- A generic list class.
Namespace
Drupal\Core\TypedData\Plugin\DataTypeCode
public function getString() {
$strings = [];
foreach ($this->list as $item) {
$strings[] = $item->getString();
}
// Remove any empty strings resulting from empty items.
return implode(', ', array_filter($strings, 'mb_strlen'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.