function ContactListBuilder::buildHeader

Same name in other branches
  1. 3.x modules/content_entity_example/src/Entity/Controller/ContactListBuilder.php \Drupal\content_entity_example\Entity\Controller\ContactListBuilder::buildHeader()

Building the header and content lines for the contact list.

Calling the parent::buildHeader() adds a column for the possible actions and inserts the 'edit' and 'delete' links as defined for the entity type.

Overrides EntityListBuilder::buildHeader

File

modules/content_entity_example/src/Entity/Controller/ContactListBuilder.php, line 77

Class

ContactListBuilder
Provides a list controller for content_entity_example entity.

Namespace

Drupal\content_entity_example\Entity\Controller

Code

public function buildHeader() {
    $header['id'] = $this->t('ContactID');
    $header['name'] = $this->t('Name');
    $header['first_name'] = $this->t('First Name');
    $header['role'] = $this->t('Role');
    return $header + parent::buildHeader();
}