コード例 #1
0
 /**
  * CircleBreadcrumbs constructor.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, MenuLinkManagerInterface $link, MenuActiveTrailInterface $active, $link_tree)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->linkManager = $link;
     $this->active = $active;
     $this->linkTree = $link_tree;
 }
コード例 #2
0
ファイル: HelpBlock.php プロジェクト: Nikola-xiii/d8intranet
 /**
  * Creates a HelpBlock 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 \Symfony\Component\HttpFoundation\Request $request
  *   The current request.
  * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
  *   The module handler.
  * @param \Drupal\Core\Routing\RouteMatchInterface $route_match
  *   The current route match.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, Request $request, ModuleHandlerInterface $module_handler, RouteMatchInterface $route_match)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->request = $request;
     $this->moduleHandler = $module_handler;
     $this->routeMatch = $route_match;
 }
コード例 #3
0
 /**
  * Constructs an SimplenewsSubscriptionBlock 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; $newsletterStorage
  *   The storage object for newsletters.
  * @param \Drupal\Core\Form\FormBuilderInterface $formBuilder
  *   The form builder object.
  * @param \Drupal\Core\Entity\Query\QueryInterface $newsletterQuery
  *   The entity query object for newsletters.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityManagerInterface $entity_manager, FormBuilderInterface $formBuilder, QueryInterface $newsletterQuery)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->entityManager = $entity_manager;
     $this->formBuilder = $formBuilder;
     $this->newsletterQuery = $newsletterQuery;
 }
コード例 #4
0
 /**
  * Constructs a new SwitchUserBlock 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\Session\AccountInterface $current_user
  *   Current user.
  * @param \Drupal\Core\Entity\EntityStorageInterface $user_storage
  *   The user storage.
  * @param \Drupal\Core\Form\FormBuilderInterface $form_builder
  *   The form builder service.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, AccountInterface $current_user, EntityStorageInterface $user_storage, FormBuilderInterface $form_builder)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->formBuilder = $form_builder;
     $this->currentUser = $current_user;
     $this->userStorage = $user_storage;
 }
コード例 #5
0
 /**
  * Constructs an AggregatorFeedBlock 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\aggregator\FeedStorageInterface $feed_storage
  *   The entity storage for feeds.
  * @param \Drupal\aggregator\ItemStorageInterface $item_storage
  *   The entity storage for feed items.
  * @param \Drupal\Core\Entity\Query\QueryInterface $item_query
  *   The entity query object for feed items.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, FeedStorageInterface $feed_storage, ItemStorageInterface $item_storage, QueryInterface $item_query)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->feedStorage = $feed_storage;
     $this->itemStorage = $item_storage;
     $this->itemQuery = $item_query;
 }
コード例 #6
0
 /**
  * Creates a NodeBlock instance.
  *
  * @param array $configuration
  * @param string $plugin_id
  * @param mixed $plugin_definition
  * @param EntityManagerInterface $entity_manager
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityManagerInterface $entity_manager)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->viewBuilder = $entity_manager->getViewBuilder('node');
     $this->nodeStorage = $entity_manager->getStorage('node');
     $this->node = $entity_manager->getStorage('node')->load($this->getDerivativeId());
 }
コード例 #7
0
 /**
  * Construct.
  *
  * @param array $configuration
  *   A configuration array containing information about the plugin instance.
  * @param string $plugin_id
  * @param mixed $plugin_definition
  * @param \Drupal\Core\Entity\EntityManager $entity_manager
  * @param \Drupal\Core\Entity\Query\QueryFactory $entity_query
  * @param \Drupal\Core\Entity\EntityFormBuilder $entity_form_builder
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityManager $entity_manager, QueryFactory $entity_query, EntityFormBuilder $entity_form_builder)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->entity_manager = $entity_manager;
     $this->entity_query = $entity_query;
     $this->entity_form_builder = $entity_form_builder;
 }
コード例 #8
0
 /**
  * {@inheritdoc}
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->platformManager = \Drupal::service('plugin.manager.social_media_links.platform');
     $this->iconsetManager = \Drupal::service('plugin.manager.social_media_links.iconset');
     $this->iconsetFinderService = \Drupal::service('social_media_links.finder');
 }
コード例 #9
0
ファイル: DemoBlock.php プロジェクト: Lullabot/challenge4
 /**
  * Construct.
  *
  * @param array $configuration
  *   A configuration array containing information about the plugin instance.
  * @param string $plugin_id
  *   The plugin_id for the plugin instance.
  * @param string $plugin_definition
  *   The plugin implementation definition.
  *
  * Add type-hinted parameters for any services to be injected into this class
  * following the normal parameters.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityManager $entity_manager, QueryFactory $entity_query)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     // Make each of injected service available as a variable in the class.
     $this->entity_manager = $entity_manager;
     $this->entity_query = $entity_query;
 }
コード例 #10
0
 /**
  * Constructs a AddContentBlock 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 string $plugin_definition
  *   The plugin implementation definition.
  * @param \Drupal\Core\Plugin\Context\ContextProviderInterface $collection_context
  *   The collection context.
  * @param \Drupal\Core\Plugin\Context\ContextProviderInterface $solution_context
  *   The solution context.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, ContextProviderInterface $collection_context, ContextProviderInterface $solution_context, ContextProviderInterface $asset_release_context)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->collectionContext = $collection_context;
     $this->solutionContext = $solution_context;
     $this->assetReleaseContext = $asset_release_context;
 }
コード例 #11
0
ファイル: RecentContent.php プロジェクト: wizzlern/cacheit
 /**
  * Constructs RecentContent class.
  *
  * @param array $configuration
  *   A configuration array containing information about the plugin instance.
  * @param string $plugin_id
  *   The plugin_id for the plugin instance.
  * @param string $plugin_definition
  *   The plugin implementation definition.
  * @param \Drupal\Core\Entity\Query\QueryFactory
  *   The entity query factory.
  * @param EntityTypeManagerInterface $entity_type_manager
  *   The entity type manager.
  * @param \Drupal\Core\Render\RendererInterface
  *   The renderer.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, QueryFactory $entity_query, EntityTypeManagerInterface $entity_type_manager, RendererInterface $renderer)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->entityQuery = $entity_query;
     $this->entityTypeManager = $entity_type_manager;
     $this->renderer = $renderer;
 }
コード例 #12
0
 /**
  * Constructs a new NodeFormBlock 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\Entity\EntityManagerInterface $entityManger
  *   The entity manager.
  * @param \Drupal\Core\Entity\EntityFormBuilderInterface $entityFormBuilder
  *   The entity form builder.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityManagerInterface $entityManager, EntityFormBuilderInterface $entityFormBuilder)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->setConfiguration($configuration);
     $this->entityManager = $entityManager;
     $this->entityFormBuilder = $entityFormBuilder;
 }
コード例 #13
0
 /**
  * Constructs a new BookNavigationBlock 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 \Symfony\Component\HttpFoundation\RequestStack $request_stack
  *   The request stack object.
  * @param \Drupal\book\BookManagerInterface $book_manager
  *   The book manager.
  * @param \Drupal\Core\Entity\EntityStorageInterface $node_storage
  *   The node storage.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, RequestStack $request_stack, BookManagerInterface $book_manager, EntityStorageInterface $node_storage)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->requestStack = $request_stack;
     $this->bookManager = $book_manager;
     $this->nodeStorage = $node_storage;
 }
コード例 #14
0
 /**
  * Constructs a new DevelSwitchUser 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\CsrfTokenGenerator $csrf_token_generator
  * @param \Drupal\Core\Form\FormBuilderInterface $form_builder
  * @param \Drupal\Core\Session\AccountProxyInterface $current_user
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, CsrfTokenGenerator $csrf_token_generator, FormBuilderInterface $form_builder, AccountProxyInterface $current_user, RedirectDestinationInterface $redirect_destination)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->csrfTokenGenerator = $csrf_token_generator;
     $this->formBuilder = $form_builder;
     $this->currentUser = $current_user;
     $this->redirectDestination = $redirect_destination;
 }
コード例 #15
0
 /**
  * Constructs a new DisqusBaseBlock.
  *
  * @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\Routing\RouteMatchInterface $route_match
  *   The current route match.
  * @param \Drupal\disqus\DisqusCommentManager $disqus_manager
  *   The disqus comment manager object.
  * @param \Drupal\Core\Session\AccountInterface $current_user
  *   The account for which view access should be checked.
  * @param \Drupal\Core\Config\ImmutableConfig $disqus_config
  *   Disqus config object.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, RouteMatchInterface $route_match, DisqusCommentManager $disqus_manager, AccountInterface $current_user, ImmutableConfig $disqus_config)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->currentUser = $current_user;
     $this->disqusManager = $disqus_manager;
     $this->routeMatch = $route_match;
     $this->disqusConfig = $disqus_config;
 }
コード例 #16
0
 /**
  * Constructs a CollectionContentBlock 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 string $plugin_definition
  *   The plugin implementation definition.
  * @param \Drupal\Core\Routing\RouteMatchInterface $current_route_match
  *   The current route match service.
  * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
  *   The entity type manager.
  * @param \Drupal\Core\Plugin\Context\ContextProviderInterface $collection_context
  *   The collection context.
  * @param \Drupal\og\MembershipManagerInterface $membership_manager
  *   The OG membership manager.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, RouteMatchInterface $current_route_match, EntityTypeManagerInterface $entity_type_manager, ContextProviderInterface $collection_context, MembershipManagerInterface $membership_manager)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->currentRouteMatch = $current_route_match;
     $this->collection = $collection_context->getRuntimeContexts(['og'])['og']->getContextValue();
     $this->entityTypeManager = $entity_type_manager;
     $this->membershipManager = $membership_manager;
 }
コード例 #17
0
 /**
  * Constructs a new BlockContentBlock.
  *
  * @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\Block\BlockManagerInterface
  *   The Plugin Block Manager.
  * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
  *   The entity manager service.
  * @param \Drupal\Core\Session\AccountInterface $account
  *   The account for which view access should be checked.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, BlockManagerInterface $block_manager, EntityManagerInterface $entity_manager, AccountInterface $account, UrlGeneratorInterface $url_generator)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->blockManager = $block_manager;
     $this->entityManager = $entity_manager;
     $this->account = $account;
     $this->urlGenerator = $url_generator;
 }
コード例 #18
0
 /**
  * {@inheritdoc}
  */
 function __construct(array $configuration, $plugin_id, $plugin_definition, RequestStack $requestStack, FlippyPager $flippyPager, ConfigFactoryInterface $configFactoryInterface, CurrentRouteMatch $routeMatch)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->request = $requestStack->getCurrentRequest();
     $this->flippyPager = $flippyPager;
     $this->flippySettings = $configFactoryInterface->get('flippy.settings');
     $this->routeMatch = $routeMatch;
 }
コード例 #19
0
 /**
  * Constructs a SolutionContentBlock.
  *
  * @param array $configuration
  *   A configuration array containing information about the plugin instance.
  * @param string $plugin_id
  *   The plugin_id for the plugin instance.
  * @param string $plugin_definition
  *   The plugin implementation definition.
  * @param \Drupal\Core\Routing\RouteMatchInterface $current_route_match
  *   The route matcher.
  * @param \Drupal\Core\Entity\EntityManager $entity_manager
  *   The deprecated entity manager.
  * @param \Drupal\Core\Plugin\Context\ContextProviderInterface $solution_context
  *   The context provider for the solution context.
  *
  * @todo EntityManager is deprecated. Use EntityTypeManager instead.
  *
  * @see https://webgate.ec.europa.eu/CITnet/jira/browse/ISAICP-2669
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, RouteMatchInterface $current_route_match, EntityManager $entity_manager, ContextProviderInterface $solution_context)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->currentRouteMatch = $current_route_match;
     if (!empty($solution_context->getRuntimeContexts(['solution'])['solution'])) {
         $this->solution = $solution_context->getRuntimeContexts(['solution'])['solution']->getContextValue();
     }
     $this->entityManager = $entity_manager;
 }
コード例 #20
0
ファイル: MegaMenuBlock.php プロジェクト: oddhill/mega_menu
 /**
  * MegaMenuBlock constructor.
  *
  * {@inheritdoc}
  *
  * @param EntityTypeManagerInterface $entityTypeManager
  *   The Drupal entity type manager.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entityTypeManager, MenuLinkTreeInterface $menuLinkTree, LayoutPluginManagerInterface $layoutPluginManager, ContextHandlerInterface $contextHandler, ContextRepositoryInterface $contextRepository, AccountInterface $account)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->entityTypeManager = $entityTypeManager;
     $this->menuLinkTree = $menuLinkTree;
     $this->layoutPluginManager = $layoutPluginManager;
     $this->contextHandler = $contextHandler;
     $this->contextRepository = $contextRepository;
     $this->account = $account;
 }
コード例 #21
0
 /**
  * Constructs a \Drupal\views\Plugin\Block\ViewsBlockBase 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\views\ViewExecutableFactory $executable_factory
  *   The view executable factory.
  * @param \Drupal\Core\Entity\EntityStorageInterface $storage
  *   The views storage.
  * @param \Drupal\Core\Session\AccountInterface $user
  *   The current user.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, ViewExecutableFactory $executable_factory, EntityStorageInterface $storage, AccountInterface $user)
 {
     $this->pluginId = $plugin_id;
     $delta = $this->getDerivativeId();
     list($name, $this->displayID) = explode('-', $delta, 2);
     // Load the view.
     $view = $storage->load($name);
     $this->view = $executable_factory->get($view);
     $this->displaySet = $this->view->setDisplay($this->displayID);
     $this->user = $user;
     parent::__construct($configuration, $plugin_id, $plugin_definition);
 }
コード例 #22
0
ファイル: EntityField.php プロジェクト: Wylbur/gj
 /**
  * Constructs a new EntityField.
  *
  * @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\EntityTypeManagerInterface $entity_type_manager
  *   The entity type manager.
  * @param \Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager
  *   The entity field manager.
  * @param \Drupal\Core\Field\FormatterPluginManager $formatter_manager
  *   The formatter manager.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, EntityFieldManagerInterface $entity_field_manager, FieldTypePluginManagerInterface $field_type_manager, FormatterPluginManager $formatter_manager)
 {
     $this->entityTypeManager = $entity_type_manager;
     $this->entityFieldManager = $entity_field_manager;
     $this->fieldTypeManager = $field_type_manager;
     $this->formatterManager = $formatter_manager;
     // Get the entity type and field name from the plugin id.
     list(, $entity_type_id, $field_name) = explode(':', $plugin_id);
     $this->entityTypeId = $entity_type_id;
     $this->fieldName = $field_name;
     parent::__construct($configuration, $plugin_id, $plugin_definition);
 }
コード例 #23
0
ファイル: RedirectFormBlock.php プロジェクト: aWEBoLabs/taxi
 /**
  * Constructs a new RedirectFormBlock.
  *
  * @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\Form\FormBuilderInterface $form_builder
  *   The form builder.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, FormBuilderInterface $form_builder)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->formBuilder = $form_builder;
 }
コード例 #24
0
 /**
  * Construct.
  *
  * @param array $configuration
  *   A configuration array containing information about the plugin instance.
  * @param string $plugin_id
  * @param mixed $plugin_definition
  * @param \Drupal\Core\Entity\EntityManager $entity_manager
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityManager $entity_manager)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->entity_manager = $entity_manager;
     $this->view_modes = $this->entity_manager->getViewModeOptions('node');
 }
コード例 #25
0
ファイル: UserLoginBlock.php プロジェクト: eigentor/tommiblog
 /**
  * Constructs a new UserLoginBlock instance.
  *
  * @param array $configuration
  *   The plugin configuration, i.e. an array with configuration values keyed
  *   by configuration option name. The special key 'context' may be used to
  *   initialize the defined contexts by setting it to an array of context
  *   values keyed by context names.
  * @param string $plugin_id
  *   The plugin_id for the plugin instance.
  * @param mixed $plugin_definition
  *   The plugin implementation definition.
  * @param \Drupal\Core\Routing\RouteMatchInterface $route_match
  *   The route match.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, RouteMatchInterface $route_match)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->routeMatch = $route_match;
 }
コード例 #26
0
ファイル: LanguageBlock.php プロジェクト: sarahwillem/OD8
 /**
  * Constructs an LanguageBlock 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\Language\LanguageManagerInterface $language_manager
  *   The language manager.
  * @param \Drupal\Core\Path\PathMatcherInterface $path_matcher
  *   The path matcher.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, LanguageManagerInterface $language_manager, PathMatcherInterface $path_matcher)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->languageManager = $language_manager;
     $this->pathMatcher = $path_matcher;
 }
コード例 #27
0
ファイル: TestAccessBlock.php プロジェクト: nstielau/drops-8
 /**
  * Tests the test access block.
  *
  *
  * @param array $configuration
  *   The plugin configuration, i.e. an array with configuration values keyed
  *   by configuration option name. The special key 'context' may be used to
  *   initialize the defined contexts by setting it to an array of context
  *   values keyed by context names.
  * @param string $plugin_id
  *   The plugin_id for the plugin instance.
  * @param mixed $plugin_definition
  *   The plugin implementation definition.
  * @param \Drupal\Core\State\StateInterface $state
  *   The state.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, StateInterface $state)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->state = $state;
 }
コード例 #28
0
 /**
  * Creates a SystemBrandingBlock 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\Config\ConfigFactoryInterface $config_factory
  *   The factory for configuration objects.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, ConfigFactoryInterface $config_factory)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->configFactory = $config_factory;
 }
コード例 #29
0
ファイル: FacetBlock.php プロジェクト: nB-MDSO/mdso-d8blog
 /**
  * Construct a FacetBlock 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 string $plugin_definition
  *   The plugin implementation definition.
  * @param \Drupal\facets\FacetManager\DefaultFacetManager $facet_manager
  *   The facet manager.
  * @param \Drupal\Core\Entity\EntityStorageInterface $facet_storage
  *   The entity storage used for facets.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, DefaultFacetManager $facet_manager, EntityStorageInterface $facet_storage)
 {
     $this->facetManager = $facet_manager;
     $this->facetStorage = $facet_storage;
     parent::__construct($configuration, $plugin_id, $plugin_definition);
 }
コード例 #30
0
 /**
  * Constructs an SharethisBlock 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\Config $sharethis_settings
  *   The config object for 'sharethis.settings'.
  * @param \Drupal\sharethis\SharethisManagerInterface $sharethis_manager
  *   The module manager service.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, Config $sharethis_settings, SharethisManagerInterface $sharethis_manager)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->sharethisSettings = $sharethis_settings;
     $this->sharethisManager = $sharethis_manager;
 }