public NodeListBuilder::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
- core/modules/node/src/NodeListBuilder.php, line 69
Class
- NodeListBuilder
- Defines a class to build a listing of node entities.
Namespace
Drupal\node
Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | public function buildHeader() { // Enable language column and filter if multiple languages are added. $header = array ( 'title' => $this ->t( 'Title' ), 'type' => array ( 'data' => $this ->t( 'Content type' ), 'class' => array (RESPONSIVE_PRIORITY_MEDIUM), ), 'author' => array ( 'data' => $this ->t( 'Author' ), 'class' => array (RESPONSIVE_PRIORITY_LOW), ), 'status' => $this ->t( 'Status' ), 'changed' => array ( 'data' => $this ->t( 'Updated' ), 'class' => array (RESPONSIVE_PRIORITY_LOW), ), ); if (\Drupal::languageManager()->isMultilingual()) { $header [ 'language_name' ] = array ( 'data' => $this ->t( 'Language' ), 'class' => array (RESPONSIVE_PRIORITY_LOW), ); } return $header + parent::buildHeader(); } |
Please login to continue.