當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Plugin\PluginBase類代碼示例

本文整理匯總了PHP中Drupal\Core\Plugin\PluginBase的典型用法代碼示例。如果您正苦於以下問題:PHP PluginBase類的具體用法?PHP PluginBase怎麽用?PHP PluginBase使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了PluginBase類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * Constructs a PluginBase 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.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->definition = $plugin_definition + $configuration;
 }
開發者ID:nsp15,項目名稱:Drupal8,代碼行數:15,代碼來源:PluginBase.php

示例2: __construct

 /**
  * Constructs a new SelectionBase 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 service.
  * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
  *   The module handler service.
  * @param \Drupal\Core\Session\AccountInterface $current_user
  *   The current user.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityManagerInterface $entity_manager, ModuleHandlerInterface $module_handler, AccountInterface $current_user)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->entityManager = $entity_manager;
     $this->moduleHandler = $module_handler;
     $this->currentUser = $current_user;
 }
開發者ID:aWEBoLabs,項目名稱:taxi,代碼行數:23,代碼來源:ViewsSelection.php

示例3: __construct

 /**
  * Default constructor
  */
 public function __construct(array $configuration, $pluginId, $pluginDefinition)
 {
     parent::__construct($configuration, $pluginId, $pluginDefinition);
     if (isset($configuration['settings'])) {
         $this->settings = (array) $configuration['settings'];
     }
 }
開發者ID:makinacorpus,項目名稱:drupal-sf-dic,代碼行數:10,代碼來源:FilterBase.php

示例4: __construct

 /**
  * Constructs a NodeAliasType instance.
  *
  * @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\Extension\ModuleHandlerInterface $module_handler
  *   The module handler service.
  * @param \Drupal\Core\Language\LanguageManagerInterface $language_manager
  *   The language manager service.
  * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
  *   The entity manager service.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, ModuleHandlerInterface $module_handler, LanguageManagerInterface $language_manager, EntityManagerInterface $entity_manager)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->moduleHandler = $module_handler;
     $this->languageManager = $language_manager;
     $this->entityManager = $entity_manager;
 }
開發者ID:dev981,項目名稱:gaptest,代碼行數:23,代碼來源:EntityAliasTypeBase.php

示例5: __construct

 /**
  * {@inheritdoc}
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->query = $this->configuration['query'];
     $this->facet = $this->configuration['facet'];
     $this->results = !empty($this->configuration['results']) ? $this->configuration['results'] : array();
 }
開發者ID:nB-MDSO,項目名稱:mdso-d8blog,代碼行數:10,代碼來源:QueryTypePluginBase.php

示例6: __construct

 /**
  * Constructs a new instance.
  *
  * @param mixed[] $configuration
  * @param string $plugin_id
  * @param mixed[] $plugin_definition
  * @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
  *   The string translator.
  * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
  *   The module handler.
  */
 public function __construct(array $configuration, $plugin_id, array $plugin_definition, TranslationInterface $string_translation, ModuleHandlerInterface $module_handler)
 {
     $configuration += $this->defaultConfiguration();
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->moduleHandler = $module_handler;
     $this->stringTranslation = $string_translation;
 }
開發者ID:nishantkumar155,項目名稱:drupal8.crackle,代碼行數:18,代碼來源:PaymentMethodConfigurationBase.php

示例7: __construct

 /**
  * Constructs widget 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 \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
  *   Event dispatcher service.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, EventDispatcherInterface $event_dispatcher, EntityManagerInterface $entity_manager)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->eventDispatcher = $event_dispatcher;
     $this->entityManager = $entity_manager;
     $this->setConfiguration($configuration);
 }
開發者ID:nB-MDSO,項目名稱:mdso-d8blog,代碼行數:19,代碼來源:WidgetBase.php

示例8: __construct

 /**
  * Constructs an ImageToolkitBase 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 array $plugin_definition
  *   The plugin implementation definition.
  * @param \Drupal\Core\ImageToolkit\ImageToolkitOperationManagerInterface $operation_manager
  *   The toolkit operation manager.
  * @param \Psr\Log\LoggerInterface $logger
  *   A logger instance.
  * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
  *   The config factory.
  */
 public function __construct(array $configuration, $plugin_id, array $plugin_definition, ImageToolkitOperationManagerInterface $operation_manager, LoggerInterface $logger, ConfigFactoryInterface $config_factory)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->operationManager = $operation_manager;
     $this->logger = $logger;
     $this->configFactory = $config_factory;
 }
開發者ID:davidsoloman,項目名稱:drupalconsole.com,代碼行數:23,代碼來源:ImageToolkitBase.php

示例9: __construct

 public function __construct(array $configuration, $plugin_id, $plugin_definition, DatabaseConnection $db, TargetInterface $target = NULL)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->db = $db;
     if ($target) {
         $this->bind($target);
     }
 }
開發者ID:nishantkumar155,項目名稱:drupal8.crackle,代碼行數:8,代碼來源:IndexerBase.php

示例10: __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\Extension\ModuleHandlerInterface
  * @param \Drupal\payment\Plugin\Payment\Status\PaymentStatusManagerInterface $payment_status_manager
  * @param \Drupal\Core\Datetime\DrupalDateTime $default_datetime
  *   The default datetime of the new status.
  */
 public function __construct(array $configuration, $plugin_id, array $plugin_definition, ModuleHandlerInterface $module_handler, PaymentStatusManagerInterface $payment_status_manager, DrupalDateTime $default_datetime)
 {
     $configuration += $this->defaultConfiguration();
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->defaultDateTime = $default_datetime;
     $this->moduleHandler = $module_handler;
     $this->paymentStatusManager = $payment_status_manager;
 }
開發者ID:nishantkumar155,項目名稱:drupal8.crackle,代碼行數:22,代碼來源:PaymentStatusBase.php

示例11: __construct

 /**
  * {@inheritdoc}
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition)
 {
     if (!isset($configuration['theme'])) {
         $configuration['theme'] = Bootstrap::getTheme();
     }
     $this->theme = $configuration['theme'];
     parent::__construct($configuration, $plugin_id, $plugin_definition);
 }
開發者ID:r-daneelolivaw,項目名稱:chalk,代碼行數:11,代碼來源:PluginBase.php

示例12: __construct

 /**
  * {@inheritdoc}
  *
  * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
  *   The config factory service.
  * @param \Drupal\printable\PrintableCssIncludeInterface $printable_css_include
  *   The printable CSS include manager.
  */
 public function __construct(array $configuration, $plugin_id, array $plugin_definition, ConfigFactoryInterface $config_factory, PrintableCssIncludeInterface $printable_css_include, LinkExtractorInterface $link_extractor)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->configFactory = $config_factory;
     $this->printableCssInclude = $printable_css_include;
     $this->linkExtractor = $link_extractor;
     $this->configuration += $this->defaultConfiguration();
 }
開發者ID:gerbreown1,項目名稱:calvaryfree,代碼行數:16,代碼來源:PrintableFormatBase.php

示例13: __construct

 /**
  * {@inheritdoc}
  */
 public function __construct(array $configuration, $pluginId, $pluginDefinition)
 {
     parent::__construct($configuration, $pluginId, $pluginDefinition);
     $this->setConfiguration($configuration);
     if (isset($pluginDefinition['parent_zone'])) {
         $this->parentZone = $pluginDefinition['parent_zone'];
     }
 }
開發者ID:jokas,項目名稱:d8.dev,代碼行數:11,代碼來源:ZoneMemberBase.php

示例14: create

 /**
  * {@inheritdoc}
  */
 public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition)
 {
     /** @var static $data_type */
     $data_type = parent::create($container, $configuration, $plugin_id, $plugin_definition);
     /** @var \Drupal\search_api\Backend\BackendPluginManager $backend_manager */
     $backend_manager = $container->get('plugin.manager.search_api.backend');
     $data_type->setBackendManager($backend_manager);
     return $data_type;
 }
開發者ID:curveagency,項目名稱:intranet,代碼行數:12,代碼來源:DataTypePluginBase.php

示例15: __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\Extension\ModuleHandlerInterface $module_handler
  *   The module handler.
  * @param \Drupal\payment\EventDispatcherInterface $event_dispatcher
  *   The event dispatcher.
  * @param \Drupal\Core\Utility\Token $token
  *   The token API.
  * @param \Drupal\payment\Plugin\Payment\Status\PaymentStatusManagerInterface
  *   The payment status manager.
  */
 public function __construct(array $configuration, $plugin_id, array $plugin_definition, ModuleHandlerInterface $module_handler, EventDispatcherInterface $event_dispatcher, Token $token, PaymentStatusManagerInterface $payment_status_manager)
 {
     $configuration += $this->defaultConfiguration();
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->eventDispatcher = $event_dispatcher;
     $this->moduleHandler = $module_handler;
     $this->paymentStatusManager = $payment_status_manager;
     $this->token = $token;
 }
開發者ID:nishantkumar155,項目名稱:drupal8.crackle,代碼行數:27,代碼來源:PaymentMethodBase.php


注:本文中的Drupal\Core\Plugin\PluginBase類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。