function PathTestCase::getPID in Drupal 7
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 modules/
path/ path.test - Tests alias functionality through the admin interfaces.
File
- modules/
path/ path.test, line 251 - 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();
}