You are here

public function SmsGatewayListBuilder::buildRow in SMS Framework 2.1.x

Same name and namespace in other branches
  1. 8 src/Lists/SmsGatewayListBuilder.php \Drupal\sms\Lists\SmsGatewayListBuilder::buildRow()
  2. 2.x src/Lists/SmsGatewayListBuilder.php \Drupal\sms\Lists\SmsGatewayListBuilder::buildRow()

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 EntityListBuilder::buildRow

See also

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

File

src/Lists/SmsGatewayListBuilder.php, line 28

Class

SmsGatewayListBuilder
Builds a list of SMS Gateway plugins.

Namespace

Drupal\sms\Lists

Code

public function buildRow(EntityInterface $entity) {

  /** @var \Drupal\sms\Entity\SmsGatewayInterface $entity */
  $row['label'] = $entity
    ->label();
  $row['gateway'] = $entity
    ->getPlugin()
    ->getPluginDefinition()['label'];
  $row['status'] = $entity
    ->status() ? $this
    ->t('Enabled') : $this
    ->t('Disabled');
  return $row + parent::buildRow($entity);
}