You are here

public function BrightcoveVideoListBuilder::buildHeader in Brightcove Video Connect 8

Same name and namespace in other branches
  1. 8.2 src/BrightcoveVideoListBuilder.php \Drupal\brightcove\BrightcoveVideoListBuilder::buildHeader()
  2. 3.x src/BrightcoveVideoListBuilder.php \Drupal\brightcove\BrightcoveVideoListBuilder::buildHeader()

Builds the header row for the entity listing.

Return value

array A render array structure of header strings.

Overrides EntityListBuilder::buildHeader

See also

\Drupal\Core\Entity\EntityListBuilder::render()

File

src/BrightcoveVideoListBuilder.php, line 86

Class

BrightcoveVideoListBuilder
Defines a class to build a listing of Brightcove Videos.

Namespace

Drupal\brightcove

Code

public function buildHeader() {

  // Assemble header columns.
  $header = [
    'video' => $this
      ->t('Video'),
    'name' => $this
      ->t('Name'),
    'status' => $this
      ->t('Status'),
    'updated' => $this
      ->t('Updated'),
    'reference_id' => $this
      ->t('Reference ID'),
    'created' => $this
      ->t('Created'),
  ];

  // Add operations header column only if the user has access.
  if ($this->accountProxy
    ->hasPermission('edit brightcove videos') || $this->accountProxy
    ->hasPermission('delete brightcove videos')) {
    $header += parent::buildHeader();
  }
  return $header;
}