public function MenuLink::query in Drupal 9
Same name and namespace in other branches
- 8 core/modules/menu_link_content/src/Plugin/migrate/source/MenuLink.php \Drupal\menu_link_content\Plugin\migrate\source\MenuLink::query()
Return value
\Drupal\Core\Database\Query\SelectInterface
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 22
Class
- MenuLink
- Drupal menu link source from database.
Namespace
Drupal\menu_link_content\Plugin\migrate\sourceCode
public function query() {
$query = $this
->select('menu_links', 'ml')
->fields('ml');
$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);
$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;
}