public function CityListBuilder::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/ CityListBuilder.php, line 85
Class
- CityListBuilder
- Provides a list controller for citylist 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);
}