protected function AdminMenuCustomizedTest::queryMlidByPath in Administration menu 8.3
Returns the menu link ID for a given link path in the admin menu.
2 calls to AdminMenuCustomizedTest::queryMlidByPath()
- AdminMenuCustomizedTest::testCustomDisabled in lib/
Drupal/ admin_menu/ Tests/ AdminMenuCustomizedTest.php - Test disabled custom links.
- AdminMenuCustomizedTest::testCustomExternal in lib/
Drupal/ admin_menu/ Tests/ AdminMenuCustomizedTest.php - Tests external links.
File
- lib/
Drupal/ admin_menu/ Tests/ AdminMenuCustomizedTest.php, line 93
Class
- AdminMenuCustomizedTest
- Tests customized menu links.
Namespace
Drupal\admin_menu\TestsCode
protected function queryMlidByPath($path) {
return \Drupal::database()
->query('SELECT mlid FROM {menu_links} WHERE menu_name = :menu AND link_path = :path', [
':menu' => 'admin',
':path' => $path,
])
->fetchField();
}