本文整理汇总了PHP中Drupal\Core\Entity\EntityListBuilder::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP EntityListBuilder::__construct方法的具体用法?PHP EntityListBuilder::__construct怎么用?PHP EntityListBuilder::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Drupal\Core\Entity\EntityListBuilder
的用法示例。
在下文中一共展示了EntityListBuilder::__construct方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructs a new UserListBuilder object.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
* @param \Drupal\Core\Entity\EntityStorageInterface $storage
* The entity storage class.
* @param \Drupal\Core\Entity\Query\QueryFactory $query_factory
* The entity query factory.
* @param \Drupal\Core\Datetime\DateFormatterInterface $date_formatter
* The date formatter service.
* @param \Drupal\Core\Routing\RedirectDestinationInterface $redirect_destination
* The redirect destination service.
*/
public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, QueryFactory $query_factory, DateFormatterInterface $date_formatter, RedirectDestinationInterface $redirect_destination)
{
parent::__construct($entity_type, $storage);
$this->queryFactory = $query_factory;
$this->dateFormatter = $date_formatter;
$this->redirectDestination = $redirect_destination;
}
示例2: __construct
/**
* Constructs a new instance.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
* @param \Drupal\Core\Entity\EntityStorageInterface $payment_storage
* The payment storage.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* The string translator.
* @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
* The module handler.
* @param \Drupal\Core\Routing\RedirectDestinationInterface $redirect_destination
* The redirect destination.
* @param \Drupal\Core\DateTime\DateFormatter $date_formatter
* The date formatter.
* @param \Drupal\Core\Entity\EntityStorageInterface $currency_storage
* The currency storage.
*/
public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $payment_storage, TranslationInterface $string_translation, ModuleHandlerInterface $module_handler, RedirectDestinationInterface $redirect_destination, DateFormatter $date_formatter, EntityStorageInterface $currency_storage)
{
parent::__construct($entity_type, $payment_storage);
$this->currencyStorage = $currency_storage;
$this->dateFormatter = $date_formatter;
$this->moduleHandler = $module_handler;
$this->redirectDestination = $redirect_destination;
$this->stringTranslation = $string_translation;
}
示例3: __construct
public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage)
{
parent::__construct($entity_type, $storage);
$type = $entity_type->id();
$entity_info = \Drupal\myeck\MyeckConfig::getForListBuilder($type);
$this->entity_label = empty($entity_info['entity_label']) ? '' : $entity_info['entity_label'];
$this->entity_id = empty($entity_info['entity_id']) ? 'id' : $entity_info['entity_id'];
$this->show_fields = array($this->entity_id => $type . ' ID');
$this->show_fields += empty($entity_info['show_fields']) ? array() : $entity_info['show_fields'];
}
示例4: __construct
/**
* @inheritDoc
*/
public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, DateFormatterInterface $date_formatter)
{
parent::__construct($entity_type, $storage);
$this->dateFormatter = $date_formatter;
}
示例5: __construct
/**
* Constructs a new UserListBuilder object.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
* @param \Drupal\Core\Entity\EntityStorageInterface $storage
* The entity storage class.
* @param \Drupal\Core\Entity\Query\QueryFactory $query_factory
* The entity query factory.
* @param \Drupal\Core\Datetime\Date $date_formatter
* The date formatter service.
*/
public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, QueryFactory $query_factory, DateFormatter $date_formatter)
{
parent::__construct($entity_type, $storage);
$this->queryFactory = $query_factory;
$this->dateFormatter = $date_formatter;
}
示例6: __construct
/**
* Constructs a new EntityListBuilder object.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
* @param \Drupal\Core\Entity\EntityStorageInterface $storage
* The entity storage class.
* @param \Drupal\scheduled_updates\UpdateUtils $updateUtils
*/
public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, UpdateUtils $updateUtils) {
parent::__construct($entity_type, $storage);
$this->updateUtils = $updateUtils;
}
示例7: __construct
/**
* Constructs a new OrderListBuilder object.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* The entity type manager.
* @param \Drupal\Core\Datetime\DateFormatter $date_formatter
* The date service.
*/
public function __construct(EntityTypeInterface $entity_type, EntityTypeManagerInterface $entity_type_manager, DateFormatter $date_formatter)
{
parent::__construct($entity_type, $entity_type_manager->getStorage($entity_type->id()));
$this->dateFormatter = $date_formatter;
}
示例8: __construct
/**
* Constructs a new UserListBuilder object.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
* @param \Drupal\Core\Entity\EntityStorageInterface $storage
* The entity storage class.
* @param \Drupal\Core\Entity\Query\QueryFactory $query_factory
* The entity query factory.
*/
public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, QueryFactory $query_factory)
{
parent::__construct($entity_type, $storage);
$this->queryFactory = $query_factory;
}
示例9: __construct
/**
* Constructs a new RegistrationListBuilder object.
*
* {@inheritdoc}
*
* @param \Drupal\rng\EventManagerInterface $event_manager
* The RNG event manager.
* @param \Drupal\Core\Routing\RedirectDestinationInterface $redirect_destination
* The redirect destination service.
*/
public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, EventManagerInterface $event_manager, RedirectDestinationInterface $redirect_destination)
{
parent::__construct($entity_type, $storage);
$this->eventManager = $event_manager;
$this->redirectDestination = $redirect_destination;
}
示例10: __construct
/**
* Constructs a new NodeListBuilder object.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
* @param \Drupal\Core\Entity\EntityStorageInterface $storage
* The entity storage class.
*/
public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage)
{
parent::__construct($entity_type, $storage);
}
示例11: __construct
/**
* Constructs a new RegistrationListBuilder object.
*
* {@inheritdoc}
*
* @param \Drupal\rng\EventManagerInterface $event_manager
* The RNG event manager.
*/
public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, EventManagerInterface $event_manager)
{
parent::__construct($entity_type, $storage);
$this->eventManager = $event_manager;
}
示例12: __construct
/**
* Constructs a new ContactListBuilder object.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
* @param \Drupal\Core\Entity\EntityStorageInterface $storage
* The entity storage class.
* @param \Drupal\Core\Routing\UrlGeneratorInterface $url_generator
* The url generator.
*/
public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, UrlGeneratorInterface $url_generator)
{
parent::__construct($entity_type, $storage);
$this->urlGenerator = $url_generator;
}
示例13: __construct
/**
* Constructs a new EntityListBuilder object.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
* @param \Drupal\Core\Entity\EntityStorageInterface $storage
* The entity storage class.
* @param EntityLayoutService $entityLayoutService
* The entity layout service class.
*/
public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, EntityLayoutService $entityLayoutService)
{
parent::__construct($entity_type, $storage);
$this->entityLayoutService = $entityLayoutService;
}
示例14: __construct
/**
* Constructs a new NodeListBuilder object.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
* @param \Drupal\Core\Entity\EntityStorageInterface $storage
* The entity storage class.
* @param \Drupal\Core\Datetime\Date $date_service
* The date service.
*/
public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, Date $date_service)
{
parent::__construct($entity_type, $storage);
$this->dateService = $date_service;
}