function drupal_get_path

Returns the path to a system item (module, theme, etc.).

Parameters

$type: The type of the item (i.e. theme, theme_engine, module, profile).

$name: The name of the item for which the path is requested.

Return value

The path to the requested item or an empty string if the item is not found.

214 calls to drupal_get_path()
ActionUpgradePathTest::setUp in drupal/core/modules/system/lib/Drupal/system/Tests/Upgrade/ActionUpgradePathTest.php
Overrides Drupal\simpletest\WebTestBase::setUp() for upgrade testing.
AggregatorTestBase::getAtomSample in drupal/core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorTestBase.php
AggregatorTestBase::getHtmlEntitiesSample in drupal/core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorTestBase.php
AggregatorTestBase::getRSS091Sample in drupal/core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorTestBase.php
ajax_forms_test_lazy_load_form_submit in drupal/core/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module
Form submit handler: Adds JavaScript and CSS that wasn't on the original form.

... See full list

1 string reference to 'drupal_get_path'
module_load_include in drupal/core/includes/module.inc
Loads a module include file.

File

drupal/core/includes/common.inc, line 1605
Common functions that many Drupal modules will need to reference.

Code

function drupal_get_path($type, $name) {
  return dirname(drupal_get_filename($type, $name));
}