当前位置: 首页>>代码示例>>PHP>>正文


PHP FieldPluginBase::__construct方法代码示例

本文整理汇总了PHP中Drupal\views\Plugin\views\field\FieldPluginBase::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP FieldPluginBase::__construct方法的具体用法?PHP FieldPluginBase::__construct怎么用?PHP FieldPluginBase::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Drupal\views\Plugin\views\field\FieldPluginBase的用法示例。


在下文中一共展示了FieldPluginBase::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Constructs a 'Disqus Comment Count' view field plugin.
  *
  * @param array $configuration
  *   A configuration array containing information about the plugin instance.
  * @param string $plugin_id
  *   The plugin_id for the plugin instance.
  * @param mixed $plugin_definition
  *   The plugin implementation definition.
  * @param \Drupal\Core\Session\AccountInterface $current_user
  *   The current user.
  * @param \Drupal\disqus\DisqusCommentManager $disqus_manager
  *   The disqus comment manager object.
  * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
  *   The config factory.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, AccountInterface $current_user, DisqusCommentManager $disqus_manager, ConfigFactoryInterface $config_factory)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->currentUser = $current_user;
     $this->disqusManager = $disqus_manager;
     $this->config = $config_factory->get('disqus.settings');
 }
开发者ID:nB-MDSO,项目名称:mdso-d8blog,代码行数:23,代码来源:DisqusCommentCount.php

示例2: __construct

 /**
  * Constructs a new BulkForm object.
  *
  * @param array $configuration
  *   A configuration array containing information about the plugin instance.
  * @param string $plugin_id
  *   The plugin ID for the plugin instance.
  * @param mixed $plugin_definition
  *   The plugin implementation definition.
  * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
  *   The entity manager.
  * @param \Drupal\Core\Language\LanguageManagerInterface $language_manager
  *   The language manager.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityManagerInterface $entity_manager, LanguageManagerInterface $language_manager)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->entityManager = $entity_manager;
     $this->actionStorage = $entity_manager->getStorage('action');
     $this->languageManager = $language_manager;
 }
开发者ID:HakS,项目名称:drupal8_training,代码行数:21,代码来源:BulkForm.php

示例3: __construct

 /**
  * Constructs a new instance.
  *
  * @param mixed[] $configuration
  *   A configuration array containing information about the plugin instance.
  * @param string $plugin_id
  *   The plugin_id for the plugin instance.
  * @param mixed $plugin_definition
  *   The plugin implementation definition.
  * @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
  *   The string translator.
  * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
  *   The module handler.
  * @param \Drupal\Core\Render\RendererInterface
  *   The renderer.
  * @param \Drupal\Core\Entity\EntityStorageInterface $currency_storage
  *   THe currency storage.
  */
 public function __construct(array $configuration, $plugin_id, array $plugin_definition, TranslationInterface $string_translation, ModuleHandlerInterface $module_handler, RendererInterface $renderer, EntityStorageInterface $currency_storage)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->definition += $this->defaultDefinition();
     $this->currencyStorage = $currency_storage;
     $this->moduleHandler = $module_handler;
     $this->renderer = $renderer;
     $this->stringTranslation = $string_translation;
 }
开发者ID:nishantkumar155,项目名称:drupal8.crackle,代码行数:27,代码来源:Amount.php

示例4: __construct

 /**
  * Constructs a new instance.
  *
  * @param mixed[] $configuration
  *   A configuration array containing information about the plugin instance.
  * @param string $plugin_id
  *   The plugin_id for the plugin instance.
  * @param mixed $plugin_definition
  *   The plugin implementation definition.
  * @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
  *   The string translator.
  * @param \Drupal\Core\Entity\EntityStorageInterface $currency_storage
  *   THe currency storage.
  *
  * @throws \InvalidArgumentException
  */
 public function __construct(array $configuration, $plugin_id, array $plugin_definition, TranslationInterface $string_translation, EntityStorageInterface $currency_storage)
 {
     if (!isset($configuration['currency_method'])) {
         throw new \InvalidArgumentException('Missing currency_method definition.');
     } elseif (!method_exists(CurrencyInterface::class, $configuration['currency_method'])) {
         throw new \InvalidArgumentException(sprintf('Method %s does not exist on \\Drupal\\currency\\Entity\\CurrencyInterface.', $configuration['currency_method']));
     }
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->currencyStorage = $currency_storage;
     $this->stringTranslation = $string_translation;
 }
开发者ID:nishantkumar155,项目名称:drupal8.crackle,代码行数:27,代码来源:Currency.php

示例5: __construct

 /**
  * Constructs a new EditRemove object.
  *
  * @param array $configuration
  *   A configuration array containing information about the plugin instance.
  * @param string $plugin_id
  *   The plugin ID for the plugin instance.
  * @param mixed $plugin_definition
  *   The plugin implementation definition.
  * @param \Drupal\commerce_cart\CartManagerInterface $cart_manager
  *   The cart manager.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, CartManagerInterface $cart_manager)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->cartManager = $cart_manager;
 }
开发者ID:marmouset,项目名称:drupal,代码行数:17,代码来源:EditRemove.php

示例6: __construct

 /**
  * Constructs a new instance.
  *
  * @param mixed[] $configuration
  *   A configuration array containing information about the plugin instance.
  * @param string $plugin_id
  *   The plugin_id for the plugin instance.
  * @param mixed $plugin_definition
  *   The plugin implementation definition.
  * @param \Drupal\payment\Plugin\Payment\Status\PaymentStatusManagerInterface $payment_status_manager
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, PaymentStatusManagerInterface $payment_status_manager)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->paymentStatusManager = $payment_status_manager;
 }
开发者ID:nishantkumar155,项目名称:drupal8.crackle,代码行数:16,代码来源:PaymentStatusLabel.php

示例7: __construct

 /**
  * Constructs a CountryCode object.
  *
  * @param array $configuration
  *   A configuration array containing information about the plugin instance.
  * @param string $pluginId
  *   The id of the plugin instance.
  * @param mixed $pluginDefinition
  *   The plugin implementation definition.
  * @param \CommerceGuys\Addressing\Repository\CountryRepositoryInterface $countryRepository
  *   The country repository.
  */
 public function __construct(array $configuration, $pluginId, $pluginDefinition, CountryRepositoryInterface $countryRepository)
 {
     parent::__construct($configuration, $pluginId, $pluginDefinition);
     $this->countryRepository = $countryRepository;
 }
开发者ID:jokas,项目名称:d8.dev,代码行数:17,代码来源:CountryCode.php

示例8: __construct

 /**
  * Constructs a \Drupal\field\Plugin\views\field\Field object.
  *
  * @param array $configuration
  *   A configuration array containing information about the plugin instance.
  * @param string $plugin_id
  *   The plugin_id for the plugin instance.
  * @param mixed $plugin_definition
  *   The plugin implementation definition.
  * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
  *   The field formatter plugin manager.
  * @param \Drupal\Core\Field\FormatterPluginManager $formatter_plugin_manager
  *   The field formatter plugin manager.
  * @param \Drupal\Core\Field\FieldTypePluginManagerInterface $field_type_plugin_manager
  *   The field plugin type manager.
  * @param \Drupal\Core\Language\LanguageManagerInterface $language_manager
  *   The language manager.
  * @param \Drupal\Core\Render\RendererInterface $renderer
  *   The renderer.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityManagerInterface $entity_manager, FormatterPluginManager $formatter_plugin_manager, FieldTypePluginManagerInterface $field_type_plugin_manager, LanguageManagerInterface $language_manager, RendererInterface $renderer)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->entityManager = $entity_manager;
     $this->formatterPluginManager = $formatter_plugin_manager;
     $this->fieldTypePluginManager = $field_type_plugin_manager;
     $this->languageManager = $language_manager;
     $this->renderer = $renderer;
     // @todo Unify 'entity field'/'field_name' instead of converting back and
     //   forth. https://www.drupal.org/node/2410779
     if (isset($this->definition['entity field'])) {
         $this->definition['field_name'] = $this->definition['entity field'];
     }
 }
开发者ID:sgtsaughter,项目名称:d8portfolio,代码行数:34,代码来源:Field.php

示例9: __construct

 /**
  * Constructs a View object.
  *
  * @param array $configuration
  *   A configuration array containing information about the plugin instance.
  * @param string $plugin_id
  *   The plugin_id for the plugin instance.
  * @param mixed $plugin_definition
  *   The plugin implementation definition.
  * @param \Drupal\Core\Config\ImmutableConfig $config
  *   The configuration object.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, ImmutableConfig $config)
 {
     $this->config = $config;
     parent::__construct($configuration, $plugin_id, $plugin_definition);
 }
开发者ID:darrylri,项目名称:protovbmwmo,代码行数:17,代码来源:View.php

示例10: __construct

 /**
  * Constructs a new Date object.
  *
  * @param array $configuration
  *   A configuration array containing information about the plugin instance.
  * @param string $plugin_id
  *   The plugin ID for the plugin instance.
  * @param mixed $plugin_definition
  *   The plugin implementation definition.
  * @param \Drupal\Core\Datetime\DateFormatter $date_formatter
  *   The date formatter service.
  * @param \Drupal\Core\Entity\EntityStorageInterface $date_format_storage
  *   The date format storage.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, DateFormatter $date_formatter, EntityStorageInterface $date_format_storage)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->dateFormatter = $date_formatter;
     $this->dateFormatStorage = $date_format_storage;
 }
开发者ID:davidsoloman,项目名称:drupalconsole.com,代码行数:20,代码来源:Date.php

示例11: __construct

 /**
  * Constructs a LinkBase object.
  *
  * @param array $configuration
  *   A configuration array containing information about the plugin instance.
  * @param string $plugin_id
  *   The plugin_id for the plugin instance.
  * @param mixed $plugin_definition
  *   The plugin implementation definition.
  * @param \Drupal\Core\Access\AccessManagerInterface $access_manager
  *   The access manager.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, AccessManagerInterface $access_manager)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->accessManager = $access_manager;
 }
开发者ID:HakS,项目名称:drupal8_training,代码行数:17,代码来源:LinkBase.php

示例12: __construct

 /**
  * Constructs a Subdivision object.
  *
  * @param array $configuration
  *   A configuration array containing information about the plugin instance.
  * @param string $plugin_id
  *   The id of the plugin instance.
  * @param mixed $plugin_definition
  *   The plugin implementation definition.
  * @param \CommerceGuys\Addressing\Repository\SubdivisionRepositoryInterface $subdivision_repository
  *   The subdivision repository.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, SubdivisionRepositoryInterface $subdivision_repository)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->subdivisionRepository = $subdivision_repository;
 }
开发者ID:seongbae,项目名称:drumo-distribution,代码行数:17,代码来源:Subdivision.php

示例13: __construct

 /**
  * Constructs a \Drupal\field\Plugin\views\field\Field object.
  *
  * @param array $configuration
  *   A configuration array containing information about the plugin instance.
  * @param string $plugin_id
  *   The plugin_id for the plugin instance.
  * @param mixed $plugin_definition
  *   The plugin implementation definition.
  * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
  *   The field formatter plugin manager.
  * @param \Drupal\Core\Field\FormatterPluginManager $formatter_plugin_manager
  *   The field formatter plugin manager.
  * @param \Drupal\Core\Language\LanguageManager $language_manager
  *   The language manager.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityManagerInterface $entity_manager, FormatterPluginManager $formatter_plugin_manager, LanguageManager $language_manager)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->entityManager = $entity_manager;
     $this->formatterPluginManager = $formatter_plugin_manager;
     $this->languageManager = $language_manager;
 }
开发者ID:alnutile,项目名称:drunatra,代码行数:23,代码来源:Field.php

示例14: __construct

 /**
  * Constructs a new BulkForm object.
  *
  * @param array $configuration
  *   A configuration array containing information about the plugin instance.
  * @param string $plugin_id
  *   The plugin ID for the plugin instance.
  * @param mixed $plugin_definition
  *   The plugin implementation definition.
  * @param \Drupal\Core\Entity\EntityStorageInterface $storage
  *   The action storage.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityStorageInterface $storage)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->actionStorage = $storage;
 }
开发者ID:anatalsceo,项目名称:en-classe,代码行数:17,代码来源:BulkForm.php

示例15: __construct

 /**
  * Constructs a TimeInterval plugin object.
  *
  * @param array $configuration
  *   A configuration array containing information about the plugin instance.
  * @param string $plugin_id
  *   The plugin_id for the plugin instance.
  * @param mixed $plugin_definition
  *   The plugin implementation definition.
  * @param \Drupal\Core\Datetime\DateFormatter $date_formatter
  *   The date formatter service.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, DateFormatter $date_formatter)
 {
     $this->dateFormatter = $date_formatter;
     parent::__construct($configuration, $plugin_id, $plugin_definition);
 }
开发者ID:anatalsceo,项目名称:en-classe,代码行数:17,代码来源:TimeInterval.php


注:本文中的Drupal\views\Plugin\views\field\FieldPluginBase::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。