You are here

public function BrightcovePlaylistListBuilder::buildHeader in Brightcove Video Connect 8

Same name and namespace in other branches
  1. 8.2 src/BrightcovePlaylistListBuilder.php \Drupal\brightcove\BrightcovePlaylistListBuilder::buildHeader()
  2. 3.x src/BrightcovePlaylistListBuilder.php \Drupal\brightcove\BrightcovePlaylistListBuilder::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/BrightcovePlaylistListBuilder.php, line 84

Class

BrightcovePlaylistListBuilder
Defines a class to build a listing of Brightcove Playlists.

Namespace

Drupal\brightcove

Code

public function buildHeader() {

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

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