public function SmsGatewayListBuilder::buildRow in SMS Framework 8
Same name and namespace in other branches
- 2.x src/Lists/SmsGatewayListBuilder.php \Drupal\sms\Lists\SmsGatewayListBuilder::buildRow()
- 2.1.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 26
Class
- SmsGatewayListBuilder
- Builds a list of SMS Gateway plugins.
Namespace
Drupal\sms\ListsCode
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);
}