public static function MenuChildrenNodeJoin::filterByPage in Views Menu Node Children Filter 3.0.x
Same name and namespace in other branches
- 8.2 src/Plugin/views/join/MenuChildrenNodeJoin.php \Drupal\views_menu_children_filter\Plugin\views\join\MenuChildrenNodeJoin::filterByPage()
- 8 src/Plugin/views/join/MenuChildrenNodeJoin.php \Drupal\views_menu_children_filter\Plugin\views\join\MenuChildrenNodeJoin::filterByPage()
Filter the query by either a: parent node, page page via its link_path, or null and limit to root nodes.
Parameters
\Drupal\views\Plugin\views\query\Sql $query The $query The query we're going to alter.:
\Drupal\menu_link_content\Plugin\Menu\MenuLinkContent $link The by parent link.:
File
- src/
Plugin/ views/ join/ MenuChildrenNodeJoin.php, line 129
Class
- MenuChildrenNodeJoin
- Views Join plugin to join the Node table to the menu_tree table.
Namespace
Drupal\views_menu_children_filter\Plugin\views\joinCode
public static function filterByPage(Sql $query, $link) {
$parent = $link
->getPluginId();
$query
->addWhereExpression(0, 'menu_link_content_data.parent = :parent_lid', array(
':parent_lid' => $parent,
));
}