protected function getPageConstraints(array $excludePages = [], $includeNotInMenu = false, $includeMenuSeparator = false) { $constraints = []; $constraints[] = 'doktype NOT IN (' . PageRepository::DOKTYPE_BE_USER_SECTION . ',' . PageRepository::DOKTYPE_RECYCLER . ',' . PageRepository::DOKTYPE_SYSFOLDER . ')'; if ($includeNotInMenu === false) { $constraints[] = 'nav_hide = 0'; } if ($includeMenuSeparator === false) { $constraints[] = 'doktype != ' . PageRepository::DOKTYPE_SPACER; } if (0 < count($excludePages)) { $constraints[] = 'uid NOT IN (' . implode(',', $excludePages) . ')'; } return 'AND ' . implode(' AND ', $constraints); }