public function LingotekProfileListBuilder::buildRow in Lingotek Translation 3.0.x
Same name and namespace in other branches
- 8 src/LingotekProfileListBuilder.php \Drupal\lingotek\LingotekProfileListBuilder::buildRow()
- 8.2 src/LingotekProfileListBuilder.php \Drupal\lingotek\LingotekProfileListBuilder::buildRow()
- 4.0.x src/LingotekProfileListBuilder.php \Drupal\lingotek\LingotekProfileListBuilder::buildRow()
- 3.1.x src/LingotekProfileListBuilder.php \Drupal\lingotek\LingotekProfileListBuilder::buildRow()
- 3.2.x src/LingotekProfileListBuilder.php \Drupal\lingotek\LingotekProfileListBuilder::buildRow()
- 3.3.x src/LingotekProfileListBuilder.php \Drupal\lingotek\LingotekProfileListBuilder::buildRow()
- 3.4.x src/LingotekProfileListBuilder.php \Drupal\lingotek\LingotekProfileListBuilder::buildRow()
- 3.5.x src/LingotekProfileListBuilder.php \Drupal\lingotek\LingotekProfileListBuilder::buildRow()
- 3.6.x src/LingotekProfileListBuilder.php \Drupal\lingotek\LingotekProfileListBuilder::buildRow()
- 3.7.x src/LingotekProfileListBuilder.php \Drupal\lingotek\LingotekProfileListBuilder::buildRow()
- 3.8.x src/LingotekProfileListBuilder.php \Drupal\lingotek\LingotekProfileListBuilder::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 DraggableListBuilder::buildRow
See also
\Drupal\Core\Entity\EntityListBuilder::render()
File
- src/
LingotekProfileListBuilder.php, line 105
Class
- LingotekProfileListBuilder
- Defines a class to build a listing of Lingotek profile entities.
Namespace
Drupal\lingotekCode
public function buildRow(EntityInterface $entity) {
/** @var \Drupal\lingotek\LingotekProfileInterface $entity */
$row['label'] = $entity
->label();
$row['auto_upload'] = [
'#type' => 'checkbox',
'#title' => t('Set @title for automatic upload', [
'@title' => $entity
->label(),
]),
'#title_display' => 'invisible',
'#disabled' => $entity
->isLocked(),
'#default_value' => $entity
->hasAutomaticUpload(),
];
$row['auto_request'] = [
'#type' => 'checkbox',
'#title' => t('Set @title for automatic request', [
'@title' => $entity
->label(),
]),
'#title_display' => 'invisible',
'#disabled' => $entity
->isLocked(),
'#default_value' => $entity
->hasAutomaticRequest(),
];
$row['auto_download'] = [
'#type' => 'checkbox',
'#title' => t('Set @title for automatic download', [
'@title' => $entity
->label(),
]),
'#title_display' => 'invisible',
'#disabled' => $entity
->isLocked(),
'#default_value' => $entity
->hasAutomaticDownload(),
];
return $row + parent::buildRow($entity);
}