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


PHP DefaultPluginManager::createInstance方法代码示例

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


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

示例1: createInstance

 /**
  * {@inheritdoc}
  */
 public function createInstance($plugin_id, array $configuration = [])
 {
     if (!$this->isPluginSupported($plugin_id)) {
         $plugin_id = $this->getFallbackPluginId($plugin_id);
     }
     return parent::createInstance($plugin_id, $configuration);
 }
开发者ID:sgtsaughter,项目名称:d8portfolio,代码行数:10,代码来源:DevelDumperPluginManager.php

示例2: createInstance

 /**
  * {@inheritdoc}
  */
 public function createInstance($plugin_id, array $configuration = array())
 {
     if (!isset($configuration['theme'])) {
         $configuration['theme'] = $this->theme;
     }
     return parent::createInstance($plugin_id, $configuration);
 }
开发者ID:archual,项目名称:drupal_materialize_theme,代码行数:10,代码来源:PluginManager.php

示例3: createInstance

 /**
  * {@inheritdoc}
  */
 public function createInstance($plugin_id, array $configuration = [])
 {
     // If a fully qualified event name is passed, be sure to get the base name
     // first.
     $plugin_id = $this->getEventBaseName($plugin_id);
     return parent::createInstance($plugin_id, $configuration);
 }
开发者ID:Progressable,项目名称:openway8,代码行数:10,代码来源:RulesEventManager.php

示例4: createInstance

 /**
  * Overrides PluginManagerBase::createInstance().
  *
  * This method is overridden to set the request object when the resource
  * object is instantiated.
  */
 public function createInstance($plugin_id, array $configuration = array())
 {
     /* @var ResourceInterface $resource */
     $resource = parent::createInstance($plugin_id, $configuration);
     $resource->setRequest($this->request);
     return $resource;
 }
开发者ID:jhoffman-tm,项目名称:waldorf-deployment,代码行数:13,代码来源:ResourcePluginManager.php

示例5: createInstance

 /**
  * {@inheritdoc}
  */
 public function createInstance($plugin_id, array $configuration = [])
 {
     $instance = parent::createInstance($plugin_id, $configuration);
     // Make sure that the instance has a UUID and generate one if necessary.
     if (!$instance->getUuid()) {
         $instance->setUuid($this->uuidService->generate());
     }
     return $instance;
 }
开发者ID:Progressable,项目名称:openway8,代码行数:12,代码来源:ExpressionManager.php

示例6: createInstance

 /**
  * Overrides \Drupal\Component\Plugin\PluginManagerBase::createInstance().
  */
 public function createInstance($plugin_id, array $configuration = array())
 {
     // We want to provide a broken handler class whenever a class is not found.
     try {
         return parent::createInstance($plugin_id, $configuration);
     } catch (PluginException $e) {
         return new SelectionBroken($configuration['field_definition']);
     }
 }
开发者ID:anatalsceo,项目名称:en-classe,代码行数:12,代码来源:SelectionPluginManager.php

示例7: createInstance

 /**
  * @param string $plugin_id
  * @param array $configuration
  *
  * @return object
  * @throws \Exception
  */
 public function createInstance($plugin_id, array $configuration = array()) {
   if (empty($configuration['route_name'])) {
     // @todo Also check for parameters?
     throw new \Exception('Route name is require configuration for GroupCreatorManager');
   }
   $route_name = $configuration['route_name'];
   /** @var \Drupal\Core\Routing\RouteProvider $route_provider */
   $route_provider = \Drupal::getContainer()->get('router.route_provider');
   $configuration['route'] = new RouteMatch($route_name, $route_provider->getRouteByName($route_name));
   unset($configuration['route_name']);
   return parent::createInstance($plugin_id, $configuration);
 }
开发者ID:eloiv,项目名称:botafoc.cat,代码行数:19,代码来源:ConditionCreatorManager.php

示例8: createInstance

 /**
  * {@inheritdoc}
  */
 public function createInstance($plugin_id, array $configuration = array()) {
   $instance = parent::createInstance($plugin_id, $configuration);
   if ($instance instanceof HandlerBase) {
     $instance->setModuleHandler($this->moduleHandler);
     $instance->setViewsData($this->viewsData);
   }
   return $instance;
 }
开发者ID:jthoresen,项目名称:PladsenDrupal,代码行数:11,代码来源:ViewsHandlerManager.php

示例9: createInstance

 /**
  * {@inheritdoc}
  *
  * @return \Drupal\Core\Queue\QueueWorkerInterface
  */
 public function createInstance($plugin_id, array $configuration = [])
 {
     return parent::createInstance($plugin_id, $configuration);
 }
开发者ID:aWEBoLabs,项目名称:taxi,代码行数:9,代码来源:QueueWorkerManager.php

示例10: createInstance

 /**
  * {@inheritdoc}
  */
 public function createInstance($plugin_id, array $configuration = array())
 {
     $configuration += (array) $this->config->get('printable.format')->get($plugin_id);
     return parent::createInstance($plugin_id, $configuration);
 }
开发者ID:gerbreown1,项目名称:calvaryfree,代码行数:8,代码来源:PrintableFormatPluginManager.php


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