function ModeratedNodeListBuilder::buildRow

Same name in other branches
  1. 8.9.x core/modules/content_moderation/src/ModeratedNodeListBuilder.php \Drupal\content_moderation\ModeratedNodeListBuilder::buildRow()
  2. 10 core/modules/content_moderation/src/ModeratedNodeListBuilder.php \Drupal\content_moderation\ModeratedNodeListBuilder::buildRow()
  3. 11.x core/modules/content_moderation/src/ModeratedNodeListBuilder.php \Drupal\content_moderation\ModeratedNodeListBuilder::buildRow()

Overrides NodeListBuilder::buildRow

File

core/modules/content_moderation/src/ModeratedNodeListBuilder.php, line 112

Class

ModeratedNodeListBuilder
Defines a class to build a listing of moderated node entities.

Namespace

Drupal\content_moderation

Code

public function buildRow(EntityInterface $entity) {
    $row = parent::buildRow($entity);
    $row['status'] = $entity->moderation_state->value;
    return $row;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.