You are here

protected function LingotekJobManagementContentEntitiesForm::getRow in Lingotek Translation 3.4.x

Same name and namespace in other branches
  1. 8.2 src/Form/LingotekJobManagementContentEntitiesForm.php \Drupal\lingotek\Form\LingotekJobManagementContentEntitiesForm::getRow()
  2. 4.0.x src/Form/LingotekJobManagementContentEntitiesForm.php \Drupal\lingotek\Form\LingotekJobManagementContentEntitiesForm::getRow()
  3. 3.0.x src/Form/LingotekJobManagementContentEntitiesForm.php \Drupal\lingotek\Form\LingotekJobManagementContentEntitiesForm::getRow()
  4. 3.1.x src/Form/LingotekJobManagementContentEntitiesForm.php \Drupal\lingotek\Form\LingotekJobManagementContentEntitiesForm::getRow()
  5. 3.2.x src/Form/LingotekJobManagementContentEntitiesForm.php \Drupal\lingotek\Form\LingotekJobManagementContentEntitiesForm::getRow()
  6. 3.3.x src/Form/LingotekJobManagementContentEntitiesForm.php \Drupal\lingotek\Form\LingotekJobManagementContentEntitiesForm::getRow()
  7. 3.5.x src/Form/LingotekJobManagementContentEntitiesForm.php \Drupal\lingotek\Form\LingotekJobManagementContentEntitiesForm::getRow()
  8. 3.6.x src/Form/LingotekJobManagementContentEntitiesForm.php \Drupal\lingotek\Form\LingotekJobManagementContentEntitiesForm::getRow()
  9. 3.7.x src/Form/LingotekJobManagementContentEntitiesForm.php \Drupal\lingotek\Form\LingotekJobManagementContentEntitiesForm::getRow()
  10. 3.8.x src/Form/LingotekJobManagementContentEntitiesForm.php \Drupal\lingotek\Form\LingotekJobManagementContentEntitiesForm::getRow()

Gets a rows fo rendering based on the passed entity.

Parameters

\Drupal\Core\Entity\EntityInterface $entity:

Return value

array A render array.

Overrides LingotekManagementFormBase::getRow

1 call to LingotekJobManagementContentEntitiesForm::getRow()
LingotekJobManagementContentEntitiesForm::getRows in src/Form/LingotekJobManagementContentEntitiesForm.php
Gets the rows for rendering based on the passed entity list.

File

src/Form/LingotekJobManagementContentEntitiesForm.php, line 175

Class

LingotekJobManagementContentEntitiesForm
Form for bulk management of job filtered content.

Namespace

Drupal\lingotek\Form

Code

protected function getRow($entity) {
  $row = parent::getRow($entity);
  $bundleInfo = $this->entityTypeBundleInfo
    ->getBundleInfo($entity
    ->getEntityTypeId());
  if ($entity
    ->hasLinkTemplate('canonical')) {
    $row['label'] = $entity
      ->toLink();
  }
  else {
    $row['label'] = $entity
      ->label();
  }
  $row['entity_type_id'] = $entity
    ->getEntityType()
    ->getLabel();
  $row['bundle'] = $bundleInfo[$entity
    ->bundle()]['label'];
  return $row;
}