function PathAliasTest::getPID
Returns the path ID.
Parameters
string $alias: A string containing an aliased path.
Return value
int Integer representing the path ID.
1 call to PathAliasTest::getPID()
- PathAliasTest::testAdminAlias in core/modules/ path/ tests/ src/ Functional/ PathAliasTest.php 
- Tests alias functionality through the admin interfaces.
File
- 
              core/modules/ path/ tests/ src/ Functional/ PathAliasTest.php, line 379 
Class
- PathAliasTest
- Tests modifying path aliases from the UI.
Namespace
Drupal\Tests\path\FunctionalCode
public function getPID($alias) {
  $result = \Drupal::entityTypeManager()->getStorage('path_alias')
    ->getQuery()
    ->condition('alias', $alias, '=')
    ->accessCheck(FALSE)
    ->execute();
  return reset($result);
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
