public function getLayoutForClass($class)
    {
        foreach (ClassTools::singleton()->getReverseAncestry($class) as $name) {
            
            if ($type = PageType::findByClass($name)) {
                
                if ($type->hasPageLayout()) {
                    return $type->getPageLayout();
                }
                
            }
            
            if ($name == SiteTree::class) {
                break;
            }
            
        }
    }