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


PHP DrupalKernel::__construct方法代碼示例

本文整理匯總了PHP中Drupal\Core\DrupalKernel::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP DrupalKernel::__construct方法的具體用法?PHP DrupalKernel::__construct怎麽用?PHP DrupalKernel::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Drupal\Core\DrupalKernel的用法示例。


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

示例1: __construct

 /**
  * {@inheritdoc}
  */
 public function __construct($environment, ClassLoader $class_loader)
 {
     parent::__construct($environment, $class_loader, FALSE);
     // Prime the module list and corresponding Extension objects.
     // @todo Remove System module. Needed because \Drupal\Core\Datetime\Date
     //   has a (needless) dependency on the 'date_format' entity, so calls to
     //   format_date()/format_interval() cause a plugin not found exception.
     $this->moduleList = array('system' => 0, 'simpletest' => 0);
     $this->moduleData = array('system' => new Extension('module', 'core/modules/system/system.info.yml', 'system.module'), 'simpletest' => new Extension('module', 'core/modules/simpletest/simpletest.info.yml', 'simpletest.module'));
 }
開發者ID:alnutile,項目名稱:drunatra,代碼行數:13,代碼來源:TestRunnerKernel.php

示例2: __construct

 /**
  * {@inheritdoc}
  */
 public function __construct($environment, $class_loader, $allow_dumping = TRUE)
 {
     // Include our bootstrap file.
     require_once __DIR__ . '/../../../../includes/bootstrap.inc';
     // Exit if we should be in a test environment but aren't.
     if (!drupal_valid_test_ua()) {
         header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden');
         exit;
     }
     parent::__construct($environment, $class_loader, $allow_dumping);
 }
開發者ID:ddrozdik,項目名稱:dmaps,代碼行數:14,代碼來源:TestKernel.php

示例3: __construct

 /**
  * {@inheritdoc}
  */
 public function __construct($environment, $class_loader, $allow_dumping = FALSE, $app_root = NULL)
 {
     // Force $allow_dumping to FALSE, because the test runner kernel should
     // always have to rebuild its container, and potentially avoid isolation
     // issues against the tests.
     parent::__construct($environment, $class_loader, FALSE, $app_root);
     // Prime the module list and corresponding Extension objects.
     // @todo Remove System module. Needed because
     //   \Drupal\Core\Datetime\DateFormatter has a (needless) dependency on the
     //   'date_format' entity, so calls to format_date()/format_interval() cause
     //   a plugin not found exception.
     $this->moduleList = array('system' => 0, 'simpletest' => 0);
     $this->moduleData = array('system' => new Extension($this->root, 'module', 'core/modules/system/system.info.yml', 'system.module'), 'simpletest' => new Extension($this->root, 'module', 'core/modules/simpletest/simpletest.info.yml', 'simpletest.module'));
 }
開發者ID:eigentor,項目名稱:tommiblog,代碼行數:17,代碼來源:TestRunnerKernel.php

示例4: __construct

 /**
  * TestDrupalKernel constructor.
  */
 public function __construct($env, $class_loader, $root)
 {
     $this->root = $root;
     parent::__construct($env, $class_loader);
 }
開發者ID:dustinleblanc,項目名稱:codeception-drupal-8,代碼行數:8,代碼來源:TestDrupalKernel.php


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