本文整理汇总了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'));
}
示例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);
}
示例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'));
}
示例4: __construct
/**
* TestDrupalKernel constructor.
*/
public function __construct($env, $class_loader, $root)
{
$this->root = $root;
parent::__construct($env, $class_loader);
}