public function StateListBuilder::buildRow in Country, State and City Fields 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 EntityListBuilder::buildRow
See also
\Drupal\Core\Entity\EntityListBuilder::render()
File
- src/
Entity/ Controller/ StateListBuilder.php, line 85
Class
- StateListBuilder
- Provides a list controller for statelist entity.
Namespace
Drupal\country_state_city\Entity\ControllerCode
public function buildRow(EntityInterface $entity) {
$row['id'] = $entity
->id();
$row['name'] = $entity
->label();
return $row + parent::buildRow($entity);
}