Chris@0: t('Migration Group'); Chris@0: $header['machine_name'] = $this->t('Machine Name'); Chris@0: $header['description'] = $this->t('Description'); Chris@0: $header['source_type'] = $this->t('Source Type'); Chris@0: return $header + parent::buildHeader(); Chris@0: } Chris@0: Chris@0: /** Chris@0: * Builds a row for an entity in the entity listing. Chris@0: * Chris@0: * @param EntityInterface $entity Chris@0: * The entity for which to build the row. Chris@0: * Chris@0: * @return array Chris@0: * A render array of the table row for displaying the entity. Chris@0: * Chris@0: * @see Drupal\Core\Entity\EntityListController::render() Chris@0: */ Chris@0: public function buildRow(EntityInterface $entity) { Chris@0: $row['label'] = $entity->label(); Chris@0: $row['machine_name'] = $entity->id(); Chris@0: $row['description'] = $entity->get('description'); Chris@0: $row['source_type'] = $entity->get('source_type'); Chris@0: Chris@0: return $row + parent::buildRow($entity); Chris@0: } Chris@0: Chris@0: /** Chris@0: * {@inheritdoc} Chris@0: */ Chris@0: public function getDefaultOperations(EntityInterface $entity) { Chris@0: $operations = parent::getDefaultOperations($entity); Chris@0: $operations['list'] = [ Chris@0: 'title' => $this->t('List migrations'), Chris@0: 'weight' => 0, Chris@0: 'url' => Url::fromRoute('entity.migration.list', ['migration_group' => $entity->id()]), Chris@0: ]; Chris@0: Chris@0: return $operations; Chris@0: } Chris@0: Chris@0: }