1.20.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.
File
- modules/
path/ tests/ path.test, line 208 - 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();
}