function _taxonomy_menu_get_mlid in Taxonomy menu 8
Same name and namespace in other branches
- 6.2 taxonomy_menu.database.inc \_taxonomy_menu_get_mlid()
- 7.2 taxonomy_menu.database.inc \_taxonomy_menu_get_mlid()
- 7 taxonomy_menu.database.inc \_taxonomy_menu_get_mlid()
Returns an mlid based on a taxonomy term ID and vocabulary ID.
Parameters
$tid: the term's ID.
$vid: the vocabulary's ID.
$langcode: (optional) Defaults to Language::LANGCODE_NOT_SPECIFIED. The language code associated to the menu link's ID.
Return value
the menu link ID associated to the $tid and $vid. If not found, returns FALSE.
11 calls to _taxonomy_menu_get_mlid()
- TaxonomyMenuConfigurationTest::testTaxonomyMenuCountNodes in lib/
Drupal/ taxonomy_menu/ Tests/ TaxonomyMenuConfigurationTest.php - Tests Taxonommy Menu "Node count" option.
- TaxonomyMenuConfigurationTest::testTaxonomyMenuHideEmptyTerms in lib/
Drupal/ taxonomy_menu/ Tests/ TaxonomyMenuConfigurationTest.php - Tests Taxonommy Menu "Hide Empty terms" option.
- TaxonomyMenuConfigurationTest::testTaxonomyMenuSyncOption in lib/
Drupal/ taxonomy_menu/ Tests/ TaxonomyMenuConfigurationTest.php - Tests Taxonommy Menu sync option.
- TaxonomyMenuConfigurationTest::testTaxonomyMenuTermDescriptionOption in lib/
Drupal/ taxonomy_menu/ Tests/ TaxonomyMenuConfigurationTest.php - Tests Taxonommy Menu "Term description" option.
- TaxonomyMenuCustomPathConfigurationTest::testTaxonomyMenuCustomPathBasePathOption in lib/
Drupal/ taxonomy_menu/ Tests/ TaxonomyMenuCustomPathConfigurationTest.php - Tests if the path is correct without the depth option.
File
- ./
taxonomy_menu.database.inc, line 52 - Database functions.
Code
function _taxonomy_menu_get_mlid($tid, $vid, $langcode = Language::LANGCODE_NOT_SPECIFIED) {
$query = db_select('taxonomy_menu', 'tm')
->fields('tm', array(
'mlid',
))
->condition('tid', $tid)
->condition('vid', $vid)
->condition('language', $langcode);
$result = $query
->execute()
->fetchField();
return $result;
}