You are here

public function MappedObjectList::buildRow in Salesforce Suite 8.3

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

modules/salesforce_mapping/src/MappedObjectList.php, line 105

Class

MappedObjectList
Provides a list controller for salesforce_mapping entity.

Namespace

Drupal\salesforce_mapping

Code

public function buildRow(EntityInterface $entity) {
  $row['id'] = $entity
    ->id();
  $row['mapped_entity']['data'] = $entity->drupal_entity
    ->first()
    ->view();
  $row['salesforce_link']['data'] = $entity->salesforce_link
    ->first()
    ->view();
  $row['mapping']['data'] = $entity->salesforce_mapping
    ->first()
    ->view();
  $row['changed'] = \Drupal::service('date.formatter')
    ->format($entity->changed->value);
  return $row + parent::buildRow($entity);
}