/** * {@inheritdoc} */ public function buildRow(EntityInterface $entity) { $row['type'] = $entity->link(); $row['registration'] = $entity->getRegistration() ? t('Yes') : t('No'); $row['multiple'] = $entity->getMultiple() ? t('Yes') : t('No'); return $row + parent::buildRow($entity); }
/** * {@inheritdoc} */ public function buildRow(EntityInterface $entity) { /* @var $entity \Drupal\customslider\Entity\Contact */ $row['id'] = $entity->id(); $row['name'] = $entity->link(); return $row + parent::buildRow($entity); }
/** * {@inheritdoc} */ public function buildRow(EntityInterface $entity) { /* @var $entity \Drupal\magic_cards\Entity\CardBase */ $row['id'] = $entity->id(); $row['name'] = $entity->link(); return $row + parent::buildRow($entity); }
/** * {@inheritdoc} */ public function buildRow(EntityInterface $entity) { /* @var $entity \Drupal\content_entity_example\Entity\Contact */ $row['id'] = $entity->id(); $row['name'] = $entity->link(); $row['first_name'] = $entity->first_name->value; $row['gender'] = $entity->gender->value; return $row + parent::buildRow($entity); }
/** * {@inheritdoc} */ public function buildRow(EntityInterface $entity) { /* @var $entity \Drupal\myeck\Entity\Myeck */ foreach ($this->show_fields as $name => $label) { switch ($name) { case $this->entity_id: $row[$name] = $entity->link($entity->id()); break; case $this->entity_label: $row[$name] = $entity->link($entity->{$name}->value); break; case 'user_id': $user_id = $entity->{$name}->target_id; $user = \Drupal\user\Entity\User::load($user_id); $row[$name] = $user->getDisplayName(); break; case 'created': case 'changed': $date = date('Y-m-d H:i:s', $entity->{$name}->value); $row[$name] = $date; break; case 'language': case 'langcode': $row[$name] = $entity->langcode->value; break; default: $row[$name] = $entity->{$name}->value; } } // $row['name'] = $entity->link(); // $row['first_name'] = $entity->first_name->value; // $row['gender'] = $entity->gender->value; // $row['name'] = $this->l( // $this->getLabel($entity), // new Url( // 'entity.my_test_entity.edit_form', array( // 'my_test_entity' => $entity->id(), // ) // ) // ); return $row + parent::buildRow($entity); }
/** * {@inheritdoc} */ public function buildRow(EntityInterface $entity) { // Special case the personal form. if ($entity->id() == 'personal') { $row['form'] = $entity->label(); $row['recipients'] = t('Selected user'); $row['selected'] = t('No'); } else { $row['form'] = $entity->link(NULL, 'canonical'); $row['recipients']['data'] = ['#theme' => 'item_list', '#items' => $entity->getRecipients(), '#context' => ['list_style' => 'comma-list']]; $default_form = \Drupal::config('contact.settings')->get('default_form'); $row['selected'] = $default_form == $entity->id() ? t('Yes') : t('No'); } return $row + parent::buildRow($entity); }
/** * {@inheritdoc} */ public function buildRow(EntityInterface $entity) { /** @var \Drupal\profile\Entity\ProfileInterface $entity */ $langcode = $entity->language()->getId(); $uri = $entity->toUrl(); $options = $uri->getOptions(); $options += $langcode != LanguageInterface::LANGCODE_NOT_SPECIFIED && isset($languages[$langcode]) ? ['language' => $languages[$langcode]] : []; $uri->setOptions($options); $row['label'] = $entity->link(); $row['type'] = $entity->getType(); $row['owner']['data'] = ['#theme' => 'username', '#account' => $entity->getOwner()]; $row['status'] = $entity->isActive() ? $this->t('active') : $this->t('not active'); $row['is_default'] = $entity->isDefault() ? $this->t('default') : $this->t('not default'); $row['changed'] = $this->dateFormatter->format($entity->getChangedTime(), 'short'); $language_manager = \Drupal::languageManager(); if ($language_manager->isMultilingual()) { $row['language_name'] = $language_manager->getLanguageName($langcode); } return $row + parent::buildRow($entity); }
/** * {@inheritdoc} */ public function buildRow(EntityInterface $entity) { $row['type'] = $entity->link(); $row['description'] = Xss::filterAdmin($entity->description); return $row + parent::buildRow($entity); }
/** * {@inheritdoc} */ public function buildRow(EntityInterface $entity) { $row['label'] = $entity->link(); return $row + parent::buildRow($entity); }
/** * {@inheritdoc} */ public function buildRow(EntityInterface $entity) { $row['type'] = $entity->link(); $row['description']['data']['#markup'] = $entity->getDescription(); return $row + parent::buildRow($entity); }
/** * {@inheritdoc} */ public function buildRow(EntityInterface $entity) { /* @var $entity \Drupal\rdf_entity\Entity\Rdf */ $row['id'] = $entity->link(); $row['rid'] = $entity->bundle(); $row['status'] = $entity->isPublished() ? $this->t('Published') : $this->t('Unpublished'); return $row + parent::buildRow($entity); }
/** * Builds a table row for a licence rdf_entity. */ public function buildRow(EntityInterface $entity) { /* @var $entity \Drupal\rdf_entity\Entity\Rdf */ $row['id'] = $entity->link(); $row['rid'] = $entity->bundle(); return $row; }