function PathAliasTest::getPID

Returns the path ID.

Parameters

$alias: A string containing an aliased path.

Return value

int Integer representing the path ID.

1 call to PathAliasTest::getPID()
PathAliasTest::testAdminAlias in drupal/core/modules/path/lib/Drupal/path/Tests/PathAliasTest.php
Tests alias functionality through the admin interfaces.

File

drupal/core/modules/path/lib/Drupal/path/Tests/PathAliasTest.php, line 196
Definition of Drupal\path\Tests\PathAliasTest.

Class

PathAliasTest
Tests path alias functionality.

Namespace

Drupal\path\Tests

Code

function getPID($alias) {
  return db_query("SELECT pid FROM {url_alias} WHERE alias = :alias", array(
    ':alias' => $alias,
  ))
    ->fetchField();
}