public function VocabularyListBuilder::buildRow in Termcase 8
Builds a row for an entity in the entity listing.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity for this row of the list.
Return value
array A render array structure of fields for this entity.
Overrides DraggableListBuilder::buildRow
See also
\Drupal\Core\Entity\EntityListBuilder::render()
File
- src/
VocabularyListBuilder.php, line 68
Class
- VocabularyListBuilder
- Defines a class to build a listing of taxonomy vocabulary entities.
Namespace
Drupal\termcaseCode
public function buildRow(EntityInterface $entity) {
$row['label'] = $entity
->label();
$vocab_machine_name = $entity
->get('vid');
$config = \Drupal::config('termcase.settings');
$mode_id = $config
->get('termcase_options_' . $vocab_machine_name);
$termcase_mode = termcase_get_mode($mode_id);
$row['termcase'] = [
'#markup' => $termcase_mode,
];
$row = $row + parent::buildRow($entity);
return $row;
}