作者:scratc
项目:ga
/**
* 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);
}
作者:hedd
项目:content_entity_bas
/**
* {@inheritdoc}
*/
public function render()
{
$build = parent::render();
// Override the empty text.
$build['table']['#empty'] = $this->t('There are no @label entities yet.', ['@label' => $this->entityType->getLabel()]);
return $build;
}
作者:novaFT
项目:quiz-drupal
/**
* {@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);
}
作者:drupalbristo
项目:drupal-bristol-websit
/**
* {@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);
}
作者:EvanSchisle
项目:OAuth2_D
/**
* {@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);
}
作者:Happycultur
项目:exercice
/**
* {@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);
}
作者:ashkarrrahma
项目:bran
/**
* {@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);
}
作者:rafikAr
项目:hall-reservatio
/**
* {@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);
}
作者:mgrimar
项目:drupal8_entit
/**
* {@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);
}
作者:mangyfo
项目:magic-v
/**
* {@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);
}
作者:walleca
项目:drupalp
/**
* {@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);
}
作者:joka
项目:d8.de
/**
* {@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));
}
作者:joshuataylo
项目:dinod
/**
* {@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);
}
作者:vinhgian
项目:Learning-Drupal-
/**
* {@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);
}
作者:tedbo
项目:scheduled-updates-dem
/**
* {@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);
}
作者:eiriks
项目:lo
/**
* {@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);
}
作者:penyaskit
项目:customslide
/**
* {@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);
}
作者:RamboLa
项目:drupal8-demo
/**
* {@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);
}
作者:ErickMR1
项目:gestiondenuncia
/**
* {@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);
}
作者:jkyt
项目:agol
/**
* {@inheritdoc}
*/
public function getDefaultOperations(EntityInterface $entity) {
$operations = parent::getDefaultOperations($entity);
$operations['edit']['title'] = $this->t('Edit items');
return $operations;
}