class DrupalSystem in X Autoload 7.4
Same name and namespace in other branches
- 7.5 src/DrupalSystem/DrupalSystem.php \Drupal\xautoload\DrupalSystem\DrupalSystem
Hierarchy
- class \Drupal\xautoload\DrupalSystem\DrupalSystem implements DrupalSystemInterface
Expanded class hierarchy of DrupalSystem
1 file declares its use of DrupalSystem
- ServiceFactory.php in lib/
DIC/ ServiceFactory.php
File
- lib/
DrupalSystem/ DrupalSystem.php, line 5
Namespace
Drupal\xautoload\DrupalSystemView source
class DrupalSystem implements DrupalSystemInterface {
function __construct() {
if (!function_exists('drupal_get_filename')) {
debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
echo "\n\n";
throw new \Exception("This class works only within a working Drupal environment.");
}
}
/**
* {@inheritdoc}
*/
function variableGet($name, $default = NULL) {
return variable_get($name, $default);
}
/**
* {@inheritdoc}
*/
function drupalGetFilename($type, $name) {
return DRUPAL_ROOT . '/' . drupal_get_filename($type, $name);
}
/**
* {@inheritdoc}
*/
function getExtensionTypes($extension_names) {
$q = db_select('system');
$q
->condition('name', $extension_names);
$q
->fields('system', array(
'name',
'type',
));
return $q
->execute()
->fetchAllKeyed();
}
/**
* {@inheritdoc}
*/
function getActiveExtensions() {
// Doing this directly tends to be a lot faster than system_list().
return db_query("SELECT name, type from {system} WHERE status = 1")
->fetchAllKeyed();
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DrupalSystem:: |
function |
Replacement of drupal_get_filename(), but returning an absolute path. Overrides DrupalSystemInterface:: |
||
DrupalSystem:: |
function |
Overrides DrupalSystemInterface:: |
||
DrupalSystem:: |
function |
Overrides DrupalSystemInterface:: |
||
DrupalSystem:: |
function |
Replacement of variable_get(). Overrides DrupalSystemInterface:: |
||
DrupalSystem:: |
function |