function MenuLink::query
Same name in other branches
- 8.9.x core/modules/menu_link_content/src/Plugin/migrate/source/MenuLink.php \Drupal\menu_link_content\Plugin\migrate\source\MenuLink::query()
- 10 core/modules/menu_link_content/src/Plugin/migrate/source/MenuLink.php \Drupal\menu_link_content\Plugin\migrate\source\MenuLink::query()
- 11.x core/modules/menu_link_content/src/Plugin/migrate/source/MenuLink.php \Drupal\menu_link_content\Plugin\migrate\source\MenuLink::query()
Overrides SqlBase::query
3 calls to MenuLink::query()
- MenuLinkLocalized::query in core/
modules/ menu_link_content/ src/ Plugin/ migrate/ source/ d7/ MenuLinkLocalized.php - MenuLinkTranslation::query in core/
modules/ menu_link_content/ src/ Plugin/ migrate/ source/ d6/ MenuLinkTranslation.php - MenuLinkTranslation::query in core/
modules/ menu_link_content/ src/ Plugin/ migrate/ source/ d7/ MenuLinkTranslation.php
3 methods override MenuLink::query()
- MenuLinkLocalized::query in core/
modules/ menu_link_content/ src/ Plugin/ migrate/ source/ d7/ MenuLinkLocalized.php - MenuLinkTranslation::query in core/
modules/ menu_link_content/ src/ Plugin/ migrate/ source/ d6/ MenuLinkTranslation.php - MenuLinkTranslation::query in core/
modules/ menu_link_content/ src/ Plugin/ migrate/ source/ d7/ MenuLinkTranslation.php
File
-
core/
modules/ menu_link_content/ src/ Plugin/ migrate/ source/ MenuLink.php, line 51
Class
- MenuLink
- Drupal 6/7 menu link source from database.
Namespace
Drupal\menu_link_content\Plugin\migrate\sourceCode
public function query() {
$query = $this->select('menu_links', 'ml')
->fields('ml')
->condition('ml.menu_name', 'shortcut-set-%', 'NOT LIKE');
$and = $query->andConditionGroup()
->condition('ml.module', 'menu')
->condition('ml.router_path', [
'admin/build/menu-customize/%',
'admin/structure/menu/manage/%',
], 'NOT IN');
$condition = $query->orConditionGroup()
->condition('ml.customized', 1)
->condition($and);
$query->condition($condition);
if (isset($this->configuration['menu_name'])) {
$query->condition('ml.menu_name', (array) $this->configuration['menu_name'], 'IN');
}
$query->leftJoin('menu_links', 'pl', '[ml].[plid] = [pl].[mlid]');
$query->addField('pl', 'link_path', 'parent_link_path');
$query->orderBy('ml.depth');
$query->orderby('ml.mlid');
return $query;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.