You are here

public function WorkflowStateListBuilder::buildHeader in Workflow 8

Builds the header row for the entity listing.

Return value

array A render array structure of header strings.

Overrides DraggableListBuilder::buildHeader

See also

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

File

src/WorkflowStateListBuilder.php, line 51

Class

WorkflowStateListBuilder
Defines a class to build a draggable listing of Workflow State entities.

Namespace

Drupal\workflow

Code

public function buildHeader() {

  // The column 'weight' is added by parent in the draggable EntityList.
  //  $header['weight'] = $this->t('Weight');
  // Some columns are not welcome in the list.
  //  $header['module'] = $this->t('Module');
  //  $header['wid'] = $this->t('Workflow');
  //  $header['sysid'] = $this->t('Sysid');
  // Add separate empty column for Drag handle for UX reasons.
  $header['drag_handle'] = '';

  // Column 'label' is manipulated in parent::buildForm(). Use 'label_new'.
  $header['label_new'] = $this
    ->t('Label');
  $header['id'] = $this
    ->t('ID');
  $header['sysid'] = '';
  $header['status'] = $this
    ->t('Active');
  $header['reassign'] = $this
    ->t('Reassign');
  $header['count'] = $this
    ->t('Count');

  // The parent::buildHeader() adds a column for the possible actions
  // and inserts 'edit' and 'delete' links as defined for the entity type.
  return $header + parent::buildHeader();
}