本文整理匯總了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);
}