function PathTestCase::getPID
7.x path.test | PathTestCase::getPID($alias) |
Returns the path ID.
Parameters
$alias: A string containing an aliased path.
Return value
int Integer representing the path ID.
1 call to PathTestCase::getPID()
- PathTestCase::testAdminAlias in drupal-7.x/
modules/ path/ path.test - Tests alias functionality through the admin interfaces.
File
- drupal-7.x/
modules/ path/ path.test, line 174 - Tests for the Path module.
Class
- PathTestCase
- Provides a base class for testing the Path module.
Code
function getPID($alias) {
return db_query("SELECT pid FROM {url_alias} WHERE alias = :alias", array(':alias' => $alias))->fetchField();
}