本文整理汇总了PHP中Drupal\Core\Entity\EntityListBuilder类的典型用法代码示例。如果您正苦于以下问题:PHP EntityListBuilder类的具体用法?PHP EntityListBuilder怎么用?PHP EntityListBuilder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了EntityListBuilder类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: testBuildRow
/**
* 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);
}
开发者ID:scratch,项目名称:gai,代码行数:27,代码来源:EntityListBuilderTest.php
示例2: render
/**
* {@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;
}
开发者ID:heddn,项目名称:content_entity_base,代码行数:10,代码来源:EntityBaseListBuilder.php
示例3: buildRow
/**
* {@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);
}
开发者ID:novaFTL,项目名称:quiz-drupal8,代码行数:10,代码来源:QuizListBuilder.php
示例4: buildRow
/**
* {@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);
}
开发者ID:drupalbristol,项目名称:drupal-bristol-website,代码行数:10,代码来源:SponsorEntityListBuilder.php
示例5: buildRow
/**
* {@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);
}
开发者ID:EvanSchisler,项目名称:OAuth2_D8,代码行数:10,代码来源:ClientEntityListBuilder.php
示例6: buildRow
/**
* {@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);
}
开发者ID:Happyculture,项目名称:exercices,代码行数:10,代码来源:AuthorEntityListBuilder.php
示例7: buildRow
/**
* {@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);
}
开发者ID:ashkarrrahman,项目名称:brand,代码行数:10,代码来源:brandListController.php
示例8: buildRow
/**
* {@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);
}
开发者ID:rafikArk,项目名称:hall-reservation,代码行数:10,代码来源:ReservationEntityListBuilder.php
示例9: buildRow
/**
* {@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);
}
开发者ID:mgrimard,项目名称:drupal8_entity,代码行数:10,代码来源:Drupal8EntityItemListBuilder.php
示例10: buildRow
/**
* {@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);
}
开发者ID:mangyfox,项目名称:magic-v2,代码行数:10,代码来源:CardBaseListBuilder.php
示例11: buildRow
/**
* {@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);
}
开发者ID:wallecan,项目名称:drupalpp,代码行数:10,代码来源:ReservationListBuilder.php
示例12: buildRow
/**
* {@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));
}
开发者ID:jokas,项目名称:d8.dev,代码行数:10,代码来源:EckEntityListBuilder.php
示例13: buildRow
/**
* {@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);
}
开发者ID:joshuataylor,项目名称:dinodb,代码行数:10,代码来源:DinosaurListBuilder.php
示例14: buildRow
/**
* {@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);
}
开发者ID:vinhgiang,项目名称:Learning-Drupal-8,代码行数:10,代码来源:CourseListController.php
示例15: buildRow
/**
* {@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);
}
开发者ID:tedbow,项目名称:scheduled-updates-demo,代码行数:10,代码来源:ScheduledUpdateListBuilder.php
示例16: buildRow
/**
* {@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);
}
开发者ID:eiriksm,项目名称:log,代码行数:10,代码来源:LogListBuilder.php
示例17: buildRow
/**
* {@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);
}
开发者ID:penyaskito,项目名称:customslider,代码行数:10,代码来源:CustomSliderListBuilder.php
示例18: buildRow
/**
* {@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);
}
开发者ID:RamboLau,项目名称:drupal8-demos,代码行数:10,代码来源:OnlineMessageListBuilder.php
示例19: buildRow
/**
* {@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);
}
开发者ID:ErickMR19,项目名称:gestiondenuncias,代码行数:10,代码来源:DefaultEntityListBuilder.php
示例20: getDefaultOperations
/**
* {@inheritdoc}
*/
public function getDefaultOperations(EntityInterface $entity) {
$operations = parent::getDefaultOperations($entity);
$operations['edit']['title'] = $this->t('Edit items');
return $operations;
}
开发者ID:jkyto,项目名称:agolf,代码行数:10,代码来源:EntitySubqueueListBuilder.php
注:本文中的Drupal\Core\Entity\EntityListBuilder类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论