You are here

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

Same name and namespace in other branches
  1. 8.2 src/Form/LingotekManagementRelatedEntitiesForm.php \Drupal\lingotek\Form\LingotekManagementRelatedEntitiesForm::getRow()
  2. 4.0.x src/Form/LingotekManagementRelatedEntitiesForm.php \Drupal\lingotek\Form\LingotekManagementRelatedEntitiesForm::getRow()
  3. 3.0.x src/Form/LingotekManagementRelatedEntitiesForm.php \Drupal\lingotek\Form\LingotekManagementRelatedEntitiesForm::getRow()
  4. 3.1.x src/Form/LingotekManagementRelatedEntitiesForm.php \Drupal\lingotek\Form\LingotekManagementRelatedEntitiesForm::getRow()
  5. 3.2.x src/Form/LingotekManagementRelatedEntitiesForm.php \Drupal\lingotek\Form\LingotekManagementRelatedEntitiesForm::getRow()
  6. 3.3.x src/Form/LingotekManagementRelatedEntitiesForm.php \Drupal\lingotek\Form\LingotekManagementRelatedEntitiesForm::getRow()
  7. 3.5.x src/Form/LingotekManagementRelatedEntitiesForm.php \Drupal\lingotek\Form\LingotekManagementRelatedEntitiesForm::getRow()
  8. 3.6.x src/Form/LingotekManagementRelatedEntitiesForm.php \Drupal\lingotek\Form\LingotekManagementRelatedEntitiesForm::getRow()
  9. 3.7.x src/Form/LingotekManagementRelatedEntitiesForm.php \Drupal\lingotek\Form\LingotekManagementRelatedEntitiesForm::getRow()
  10. 3.8.x src/Form/LingotekManagementRelatedEntitiesForm.php \Drupal\lingotek\Form\LingotekManagementRelatedEntitiesForm::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 LingotekManagementRelatedEntitiesForm::getRow()
LingotekManagementRelatedEntitiesForm::getRows in src/Form/LingotekManagementRelatedEntitiesForm.php
Gets the rows for rendering based on the passed entity list.

File

src/Form/LingotekManagementRelatedEntitiesForm.php, line 230

Class

LingotekManagementRelatedEntitiesForm
Form for bulk management of related content.

Namespace

Drupal\lingotek\Form

Code

protected function getRow($entity) {

  // For this method to be able to be reused for the table component, order
  // matters, so we rebuild the order of the row. For tableselect the headers
  // defines the order, for the table, the order we add to the array matters.
  $parentRow = parent::getRow($entity);
  $bundleInfo = $this->entityTypeBundleInfo
    ->getBundleInfo($entity
    ->getEntityTypeId());
  $row['title'] = $parentRow['title'];
  $row['entity_type_id'] = $entity
    ->getEntityType()
    ->getLabel();
  $row['bundle'] = $bundleInfo[$entity
    ->bundle()]['label'];
  $row['title'] = $parentRow['title'];
  $row['source'] = $parentRow['source'];
  $row['translations'] = $parentRow['translations'];
  $row['profile'] = $parentRow['profile'];
  $row['job_id'] = $parentRow['job_id'];
  return $row;
}