You are here

public function RuleListBuilder::buildRow in JS injector 8

Builds a row for an entity in the entity listing.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity for this row of the list.

Return value

array A render array structure of fields for this entity.

Overrides DraggableListBuilder::buildRow

See also

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

File

lib/Drupal/js_injector/RuleListBuilder.php, line 45
Contains \Drupal\js_injector\RuleListBuilder.

Class

RuleListBuilder
Defines a class to build a listing of js_injector_rule entities.

Namespace

Drupal\js_injector

Code

public function buildRow(EntityInterface $entity) {
  $row['label'] = String::placeholder($entity
    ->get('label'));
  $description = String::checkPlain($entity
    ->get('description'));
  $row['roles'] = !empty($this->weightKey) ? array(
    '#markup' => $description,
  ) : $description;
  return $row + parent::buildRow($entity);
}