function drupal_get_path in Drupal 8
Same name and namespace in other branches
- 4 includes/common.inc \drupal_get_path()
- 5 includes/common.inc \drupal_get_path()
- 6 includes/common.inc \drupal_get_path()
- 7 includes/common.inc \drupal_get_path()
- 9 core/includes/bootstrap.inc \drupal_get_path()
Returns the path to a system item (module, theme, etc.).
Parameters
$type: The type of the item; one of 'core', 'profile', 'module', 'theme', or 'theme_engine'.
$name: The name of the item for which the path is requested. Ignored for $type 'core'.
Return value
string The path to the requested item or an empty string if the item is not found.
113 calls to drupal_get_path()
- AggregatorTestBase::getAtomSample in core/
modules/ aggregator/ src/ Tests/ AggregatorTestBase.php - Returns a example Atom feed.
- AggregatorTestBase::getAtomSample in core/
modules/ aggregator/ tests/ src/ Functional/ AggregatorTestBase.php - Returns a example Atom feed.
- AggregatorTestBase::getHtmlEntitiesSample in core/
modules/ aggregator/ src/ Tests/ AggregatorTestBase.php - Returns a example feed.
- AggregatorTestBase::getHtmlEntitiesSample in core/
modules/ aggregator/ tests/ src/ Functional/ AggregatorTestBase.php - Returns a example feed.
- AggregatorTestBase::getRSS091Sample in core/
modules/ aggregator/ src/ Tests/ AggregatorTestBase.php - Returns a example RSS091 feed.
1 string reference to 'drupal_get_path'
- module_load_include in core/
includes/ module.inc - Loads a module include file.
File
- core/
includes/ bootstrap.inc, line 313 - Functions that need to be loaded on every Drupal request.
Code
function drupal_get_path($type, $name) {
return dirname(drupal_get_filename($type, $name));
}