public function byId($callerClass, $id, $cache = true, $requiredPerm = 'View')
    {
        $id = (int) $id;
        $item = DataObject::get_by_id($callerClass, $id, $cache);
        if ($item && $item->hasExtension('Restrictable') && $item->checkPerm($requiredPerm)) {
            return $item;
        }
        
        if ($item && !$item->hasExtension('Restrictable') && $item->canView()) {
            return $item;
        }
    }