rvr-nextgen/src/Repository/CommunityRepository.php
Pőcze Bence b43ed72040
All checks were successful
rvr-nextgen/pipeline/pr-master This commit looks good
RVRNEXT-24 replace id-based search to slug-based for communities
2023-05-07 01:54:10 +02:00

17 lines
422 B
PHP

<?php namespace RVR\Repository;
use RVR\PersistentData\Model\Community;
class CommunityRepository
{
public function getById(int $id): ?Community
{
return \Container::$persistentDataManager->selectFromDbById($id, Community::class);
}
public function getBySlug(string $slug): ?Community
{
return \Container::$persistentDataManager->selectFromDbBySlug($slug, Community::class);
}
}