public function MenuLink::query in Drupal 8
Same name and namespace in other branches
- 9 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
1 call to MenuLink::query()
- MenuLinkTranslation::query in core/
modules/ menu_link_content/ src/ Plugin/ migrate/ source/ d6/ MenuLinkTranslation.php
1 method overrides MenuLink::query()
- MenuLinkTranslation::query in core/
modules/ menu_link_content/ src/ Plugin/ migrate/ source/ d6/ 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;
}