/**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     /* @var $entity \Drupal\content_entity_example\Entity\OnlineMessage */
     $row['id'] = $entity->id();
     $row['name'] = $this->l($entity->label(), new Url('entity.online_message.edit_form', array('online_message' => $entity->id())));
     return $row + parent::buildRow($entity);
 }
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     /* @var $entity \Drupal\hall_reservation\Entity\ReservationEntity */
     $row['id'] = $entity->id();
     $row['name'] = $this->l($this->getLabel($entity), new Url('entity.reservation_entity.edit_form', array('reservation_entity' => $entity->id())));
     return $row + parent::buildRow($entity);
 }
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     /* @var $entity \Drupal\drupalbristol_sponsors\Entity\SponsorEntity */
     $row['id'] = $entity->id();
     $row['name'] = $this->l($entity->label(), new Url('entity.sponsor.edit_form', array('sponsor' => $entity->id())));
     return $row + parent::buildRow($entity);
 }
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     /* @var $entity \Drupal\oauth2_server\Entity\ClientEntity */
     $row['id'] = $entity->id();
     $row['server'] = \Drupal::l($this->getLabel($entity), new Url('entity.oauth2_server_client.edit_form', array('oauth2_server_client' => $entity->id())));
     return $row + parent::buildRow($entity);
 }
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     /* @var $entity \Drupal\happy_alexandrie\Entity\AuthorEntity */
     $row['id'] = $entity->id();
     $row['name'] = $this->l($this->getLabel($entity), new Url('entity.author_entity.edit_form', array('author_entity' => $entity->id())));
     return $row + parent::buildRow($entity);
 }
Пример #6
0
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     /* @var $entity \Drupal\quiz\Entity\Quiz */
     $row['id'] = $entity->id();
     $row['name'] = $this->l($this->getLabel($entity), new Url('entity.quiz.canonical', array('quiz' => $entity->id())));
     return $row + parent::buildRow($entity);
 }
Пример #7
0
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     /* @var $entity \Drupal\content_entity_example\Entity\Contact */
     $row['rid'] = $entity->id();
     $row['first_name'] = $entity->first_name->value;
     return $row + parent::buildRow($entity);
 }
Пример #8
0
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     /* @var $entity \Drupal\brand\Entity\brand */
     $row['id'] = $entity->id();
     $row['name'] = \Drupal::l($this->getLabel($entity), new Url('entity.brand.edit_form', array('brand' => $entity->id())));
     return $row + parent::buildRow($entity);
 }
Пример #9
0
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     /* @var $entity \Drupal\eck\Entity\EckEntity */
     $row['id'] = $entity->id();
     $row['title'] = \Drupal::l($this->getLabel($entity), Url::fromRoute('entity.' . $this->entityTypeId . '.canonical', array($this->entityTypeId => $entity->id())));
     return array_merge($row, parent::buildRow($entity));
 }
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     /* @var $entity \Drupal\my_first_entity\Entity\Course */
     $row['id'] = $entity->id();
     $row['name'] = \Drupal::l($this->getLabel($entity), new Url('entity.course.edit_form', array('course' => $entity->id())));
     return $row + parent::buildRow($entity);
 }
Пример #11
0
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     /* @var $entity \Drupal\dinodb\Entity\Dinosaur */
     $row['id'] = $entity->id();
     $row['name'] = $this->l($this->getLabel($entity), new Url('entity.dinosaur.edit_form', array('dinosaur' => $entity->id())));
     return $row + parent::buildRow($entity);
 }
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     /* @var $entity \Drupal\scheduled_updates\Entity\ScheduledUpdate */
     $row['name'] = $this->l($entity->label(), new Url('entity.scheduled_update.edit_form', array('scheduled_update' => $entity->id())));
     $row['type'] = $this->updateUtils->getUpdateTypeLabel($entity);
     return $row + parent::buildRow($entity);
 }
Пример #13
0
 /**
  * {@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);
 }
Пример #14
0
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     /* @var $entity \Drupal\log\Entity\Log */
     $row['id'] = $entity->id();
     $row['name'] = $this->l($this->getLabel($entity), new Url('entity.log.edit_form', array('log' => $entity->id())));
     return $row + parent::buildRow($entity);
 }
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     /* @var $entity \Drupal\gestiondenuncias\Entity\DefaultEntity */
     $row['id'] = $entity->id();
     $row['name'] = $this->l($this->getLabel($entity), new Url('entity.default_entity.edit_form', array('default_entity' => $entity->id())));
     return $row + parent::buildRow($entity);
 }
Пример #16
0
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     /* @var $entity \Drupal\commerce_order\Entity\Order */
     $orderType = OrderType::load($entity->bundle());
     $row = ['order_id' => $entity->id(), 'type' => $orderType->label(), 'customer' => ['data' => ['#theme' => 'username', '#account' => $entity->getOwner()]], 'state' => $entity->getState()->getLabel(), 'created' => $this->dateFormatter->format($entity->getCreatedTime(), 'short')];
     return $row + parent::buildRow($entity);
 }
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     /* @var $entity \Drupal\drupal8_entity\Entity\Drupal8EntityItem */
     $row['id'] = $entity->id();
     $row['name'] = $this->l($entity->label(), new Url('entity.drupal8_entity_item.edit_form', array('drupal8_entity_item' => $entity->id())));
     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);
 }
Пример #19
0
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     /* @var $entity \Drupal\foo_bar\Entity\FooBar */
     $row['id'] = $entity->id();
     $row['label'] = l($this->getLabel($entity), 'foo-bar/' . $entity->id());
     $row['foo_bar_field'] = $entity->getFooBarField();
     return $row + parent::buildRow($entity);
 }
Пример #20
0
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     $row = array();
     $row['date']['data'] = $entity->get('activity_date')->view(array('label' => 'hidden'));
     $row['title']['data'] = array('#type' => 'link', '#title' => SafeMarkup::checkPlain($entity->label()), '#url' => $entity->urlInfo());
     $row['type'] = $entity->get('type')->entity->label();
     return $row + parent::buildRow($entity);
 }
Пример #21
0
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     /* @var $entity \Drupal\component\Entity\Component */
     $row['id'] = $entity->id();
     $row['name'] = $this->l($entity->label(), new Url('entity.component.canonical', array('component' => $entity->id())));
     $row['uuid'] = $entity->uuid();
     return $row + parent::buildRow($entity);
 }
Пример #22
0
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     /* @var $entity \Drupal\commerce_store\Entity\Store */
     $store_type = StoreType::load($entity->bundle());
     $row['name']['data'] = ['#type' => 'link', '#title' => $entity->label()] + $entity->urlInfo()->toRenderArray();
     $row['type'] = $store_type->label();
     return $row + parent::buildRow($entity);
 }
Пример #23
0
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     /* @var $entity \Drupal\custom_page\Entity\CustomPage */
     $row['id'] = $entity->id();
     $row['name'] = $this->l($entity->label(), new Url('entity.custom_page.canonical', array('custom_page' => $entity->id())));
     $row['uuid'] = $entity->uuid();
     return $row + parent::buildRow($entity);
 }
Пример #24
0
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     $row = array();
     $row['label']['data'] = array('#type' => 'link', '#title' => SafeMarkup::checkPlain($entity->label()), '#url' => $entity->urlInfo());
     $row['type'] = SafeMarkup::checkPlain($entity->get('type')->entity->label());
     $row['changed'] = $this->dateFormatter->format($entity->get('changed')->value, 'short');
     return $row + parent::buildRow($entity);
 }
Пример #25
0
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     /* @var $entity \Drupal\interns\Entity\InternsEntity */
     $row['id'] = $entity->id();
     $row['name'] = \Drupal::l($this->getLabel($entity), new Url('entity.interns_entity.edit_form', array('interns_entity' => $entity->id())));
     $row['interns'] = $entity->interns->value;
     return $row + parent::buildRow($entity);
 }
Пример #26
0
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     /** @var \Drupal\conference_sessions\Entity\RoomTypeInterface $entity */
     $product_type = RoomType::load($entity->bundle());
     $row['title']['data'] = ['#type' => 'link', '#title' => $entity->label()] + $entity->toUrl()->toRenderArray();
     $row['type'] = $product_type->label();
     $row['status'] = $entity->isPublished() ? $this->t('Published') : $this->t('Unpublished');
     return $row + parent::buildRow($entity);
 }
Пример #27
0
 /**
  * Tests that buildRow() returns a string which has been run through
  * SafeMarkup::checkPlain().
  *
  * @dataProvider providerTestBuildRow
  *
  * @param string $input
  *  The entity label being passed into buildRow.
  * @param string $expected
  *  The expected output of the label from buildRow.
  * @param string $message
  *   The message to provide as output for the test.
  * @param bool $ignorewarnings
  *   Whether or not to ignore PHP 5.3+ invalid multibyte sequence warnings.
  *
  * @see \Drupal\Core\Entity\EntityListBuilder::buildRow()
  */
 public function testBuildRow($input, $expected, $message, $ignorewarnings = FALSE)
 {
     $this->role->expects($this->any())->method('label')->will($this->returnValue($input));
     if ($ignorewarnings) {
         $built_row = @$this->entityListBuilder->buildRow($this->role);
     } else {
         $built_row = $this->entityListBuilder->buildRow($this->role);
     }
     $this->assertEquals($built_row['label'], $expected, $message);
 }
Пример #28
0
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity)
 {
     $langcode = $entity->language()->getId();
     $uri = $entity->toUrl();
     $options = $uri->getOptions();
     $options += $langcode != LanguageInterface::LANGCODE_NOT_SPECIFIED && isset($languages[$langcode]) ? array('language' => $languages[$langcode]) : array();
     $uri->setOptions($options);
     $row['name']['data'] = array('#type' => 'link', '#title' => $entity->label(), '#url' => $uri);
     $row['scales']['data'] = array('#type' => 'markup', '#markup' => implode(', ', $entity->getScales()));
     return $row + parent::buildRow($entity);
 }
Пример #29
0
 /**
  * {@inheritdoc}
  */
 public function buildRow(EntityInterface $entity) {
   /* @var $entity \Drupal\product_search\Entity\Person */
   $row['id'] = $entity->id();
   $row['name'] = $this->l(
     $this->getLabel($entity),
     new Url(
       'entity.ps_person.edit_form', array(
         'ps_person' => $entity->id(),
       )
     )
   );
   return $row + parent::buildRow($entity);
 }
Пример #30
0
  /**
   * {@inheritdoc}
   */
  public function buildRow(EntityInterface $entity) {
    /* @var $entity \Drupal\commerce_product\Entity\Product */
    $productType = ProductType::load($entity->bundle());

    $row['title']['data'] = [
      '#type' => 'link',
      '#title' => $entity->label(),
    ] + $entity->urlInfo()->toRenderArray();
    $row['type'] = $productType->label();
    $row['status'] = $entity->isPublished() ? $this->t('Published') : $this->t('Unpublished');

    return $row + parent::buildRow($entity);
  }