ExplodedListField.php in Legal 8
Same filename and directory in other branches
Namespace
Drupal\legal\Plugin\views\fieldFile
src/Plugin/views/field/ExplodedListField.phpView source
<?php
namespace Drupal\legal\Plugin\views\field;
use Drupal\views\Plugin\views\field\FieldPluginBase;
use Drupal\views\ResultRow;
/**
* Field handler to flag the node type.
*
* @ingroup views_field_handlers
*
* @ViewsField("exploded_list")
*/
class ExplodedListField extends FieldPluginBase {
/**
* {@inheritdoc}
*/
public function render(ResultRow $values) {
$changes = explode("\r\n", $values->{$this->field_alias});
$build = [
'#theme' => 'item_list',
'#items' => $changes,
];
return $build;
}
}
Classes
Name | Description |
---|---|
ExplodedListField | Field handler to flag the node type. |