function PathTestCase::getPID

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

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();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.