protected function verifyEntries($entries, WebRequest $request)
    {
        foreach ($entries as $key => $entry) {
            // If the entry is a ProtectedMenuEntry, verify the entry
            if ($entry instanceof \Zepi\Web\General\Entity\ProtectedMenuEntry) {
                $result = $this->verifyProtectedEntry($entry, $request);
        
                // If the entry isn't allowed remove it from the array
                if (!$result) {
                    unset($entries[$key]);
                }
            }
        
            // If the entry has children, verify all children
            if ($entry->hasChildren()) {
                $children = $this->verifyEntries($entry->getChildren(), $request);
        
                $entry->setChildren($children);
            }
        }
        
        return $entries;
    }