本文整理匯總了PHP中Drupal\Core\Config\Entity\ConfigEntityListBuilder::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP ConfigEntityListBuilder::__construct方法的具體用法?PHP ConfigEntityListBuilder::__construct怎麽用?PHP ConfigEntityListBuilder::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Drupal\Core\Config\Entity\ConfigEntityListBuilder
的用法示例。
在下文中一共展示了ConfigEntityListBuilder::__construct方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
/**
* Constructs a new instance.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
* @param \Drupal\Core\Entity\EntityStorageInterface $payment_method_configuration_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\payment\Plugin\Payment\MethodConfiguration\PaymentMethodConfigurationManagerInterface $payment_method_configuration_manager
* The payment method configuration manager.
*/
public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $payment_method_configuration_storage, TranslationInterface $string_translation, ModuleHandlerInterface $module_handler, PaymentMethodConfigurationManagerInterface $payment_method_configuration_manager)
{
parent::__construct($entity_type, $payment_method_configuration_storage);
$this->moduleHandler = $module_handler;
$this->paymentMethodConfigurationManager = $payment_method_configuration_manager;
$this->stringTranslation = $string_translation;
}
示例2: __construct
/**
* Constructs a new FieldStorageConfigListBuilder object.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
* @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
* The entity manager.
* @param \Drupal\Core\Field\FieldTypePluginManagerInterface $field_type_manager
* The 'field type' plugin manager.
*/
public function __construct(EntityTypeInterface $entity_type, EntityManagerInterface $entity_manager, FieldTypePluginManagerInterface $field_type_manager, EntityTypeBundleInfoInterface $bundle_info_service)
{
parent::__construct($entity_type, $entity_manager->getStorage($entity_type->id()));
$this->entityManager = $entity_manager;
$this->bundles = $bundle_info_service->getAllBundleInfo();
$this->fieldTypeManager = $field_type_manager;
$this->fieldTypes = $this->fieldTypeManager->getDefinitions();
}
示例3: __construct
/**
* {@inheritdoc}
*/
public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage)
{
parent::__construct($entity_type, $storage);
// Check if the entity type supports weighting.
if ($this->entityType->hasKey('weight')) {
$this->weightKey = $this->entityType->getKey('weight');
}
}
示例4: __construct
/**
* Constructs a new FieldStorageConfigListBuilder object.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
* @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
* The entity manager.
* @param \Drupal\Core\Field\FieldTypePluginManagerInterface $field_type_manager
* The 'field type' plugin manager.
*/
public function __construct(EntityTypeInterface $entity_type, EntityManagerInterface $entity_manager, FieldTypePluginManagerInterface $field_type_manager)
{
parent::__construct($entity_type, $entity_manager->getStorage($entity_type->id()));
$this->entityManager = $entity_manager;
$this->bundles = entity_get_bundles();
$this->fieldTypeManager = $field_type_manager;
$this->fieldTypes = $this->fieldTypeManager->getDefinitions();
}
示例5: __construct
/**
* Constructs a new ViewListBuilder object.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
* @param \Drupal\Core\Entity\EntityStorageInterface $storage.
* The entity storage class.
* @param \Drupal\Component\Plugin\PluginManagerInterface $display_manager
* The views display plugin manager to use.
*/
public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, PluginManagerInterface $display_manager)
{
parent::__construct($entity_type, $storage);
$this->displayManager = $display_manager;
// This list builder uses client-side filters which requires all entities to
// be listed, disable the pager.
// @todo https://www.drupal.org/node/2536826 change the filtering to support
// a pager.
$this->limit = FALSE;
}
示例6: __construct
/**
* Constructs a new class instance.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
* @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
* The entity manager.
*/
public function __construct(EntityTypeInterface $entity_type, EntityManagerInterface $entity_manager) {
parent::__construct($entity_type, $entity_manager->getStorage($entity_type->id()));
$this->entityManager = $entity_manager;
}
示例7: __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\Core\Entity\EntityManagerInterface $entity_manager
* The entity manager.
* @param \Drupal\Core\Session\AccountInterface $current_user
* The current user.
*/
public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, EntityManagerInterface $entity_manager, AccountInterface $current_user)
{
parent::__construct($entity_type, $storage);
$this->entityManager = $entity_manager;
$this->currentUser = $current_user;
}
示例8: __construct
/**
* Constructs a new BlockListBuilder 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\Block\BlockManagerInterface $block_manager
* The block manager.
*/
public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, BlockManagerInterface $block_manager)
{
parent::__construct($entity_type, $storage);
$this->blockManager = $block_manager;
}
示例9: __construct
/**
* Constructs a new EntityDisplayModeListBuilder 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\EntityTypeInterface[] $entity_types
* List of all entity types.
*/
public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, array $entity_types)
{
parent::__construct($entity_type, $storage);
$this->entityTypes = $entity_types;
}
示例10: __construct
/**
* Constructs a new EncryptionProfileListBuilder object.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
* @param \Drupal\Core\Entity\EntityStorageInterface $storage
* The entity storage class.
* @param ConfigFactoryInterface $config_factory
* The configuration factory.
*/
public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, ConfigFactoryInterface $config_factory)
{
parent::__construct($entity_type, $storage);
$this->config = $config_factory->get('encrypt.settings');
}
示例11: __construct
/**
* {@inheritdoc}
*/
public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, KeyProviderPluginManager $key_provider_plugin_manager)
{
parent::__construct($entity_type, $storage);
$this->keyProviderPluginManager = $key_provider_plugin_manager;
}
示例12: __construct
/**
* Constructs a new ActionListBuilder object.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
* @param \Drupal\Core\Entity\EntityStorageInterface $storage
* The action storage.
* @param \Drupal\Core\Action\ActionManager $action_manager
* The action plugin manager.
*/
public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, ActionManager $action_manager)
{
parent::__construct($entity_type, $storage);
$this->actionManager = $action_manager;
}
示例13: __construct
/**
* Constructs a new instance.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type.
* @param \Drupal\Core\Entity\EntityStorageInterface $entity_storage
* The entity storage.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* The string translator.
* @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
* The module handler.
*/
public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $entity_storage, TranslationInterface $string_translation, ModuleHandlerInterface $module_handler)
{
parent::__construct($entity_type, $entity_storage);
$this->moduleHandler = $module_handler;
$this->stringTranslation = $string_translation;
}
示例14: __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\flags_languages\FullLanguageManagerInterface $fullLanguageManager
*/
public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, FullLanguageManagerInterface $fullLanguageManager)
{
parent::__construct($entity_type, $storage);
$this->languageManager = $fullLanguageManager;
}
示例15: __construct
/**
* Constructs a new DateFormatListBuilder 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;
}