‪TYPO3CMS  ‪main
TYPO3Tests\BlogExample\Domain\Repository\PostRepository Class Reference
Inheritance diagram for TYPO3Tests\BlogExample\Domain\Repository\PostRepository:
TYPO3\CMS\Extbase\Persistence\Repository TYPO3\CMS\Extbase\Persistence\Repository TYPO3\CMS\Extbase\Persistence\RepositoryInterface TYPO3\CMS\Extbase\Persistence\RepositoryInterface TYPO3\CMS\Core\SingletonInterface TYPO3\CMS\Extbase\Persistence\RepositoryInterface TYPO3\CMS\Extbase\Persistence\RepositoryInterface TYPO3\CMS\Core\SingletonInterface

Public Member Functions

 findAllByBlog (Blog $blog)
 
 findByTagAndBlog (string $tag, Blog $blog)
 
 findRemaining (Post $post)
 
 findPrevious (Post $post)
 
 findNext (Post $post)
 
QueryResultInterface findRecentByBlog (Blog $blog, int $limit=5)
 
 findByCategory (int $categoryUid)
 
 findAllSortedByCategory (array $uids)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Extbase\Persistence\Repository
 __construct ()
 
 add ($object)
 
 remove ($object)
 
 update ($modifiedObject)
 
QueryResultInterface array findAll ()
 
int countAll ()
 
 removeAll ()
 
object null findByUid ($uid)
 
object null findByIdentifier ($identifier)
 
 setDefaultOrderings (array $defaultOrderings)
 
 setDefaultQuerySettings (QuerySettingsInterface $defaultQuerySettings)
 
QueryInterface createQuery ()
 
mixed __call ($methodName, $arguments)
 
QueryResultInterface findBy (array $criteria, array $orderBy=null, int $limit=null, int $offset=null)
 
 findOneBy (array $criteria, array $orderBy=null)
 
 count (array $criteria)
 

Protected Attributes

 $defaultOrderings = array( 'date' => QueryInterface::ORDER_DESCENDING )
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Extbase\Persistence\Repository
PersistenceManagerInterface $persistenceManager
 
string $objectType
 
array< non-empty-string, $defaultOrderings=array();protected QuerySettingsInterface $defaultQuerySettings;public function injectPersistenceManager(PersistenceManagerInterface $persistenceManager) { $this-> persistenceManager = $persistenceManager
 

Additional Inherited Members

- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Extbase\Persistence\Repository
class string< static > getRepositoryClassName ()
 

Detailed Description

A repository for blog posts

<Post>

Definition at line 31 of file PostRepository.php.

Member Function Documentation

◆ findAllByBlog()

TYPO3Tests\BlogExample\Domain\Repository\PostRepository::findAllByBlog ( Blog  $blog)

Finds all posts by the specified blog

Parameters
Blog$blog‪The blog the post must refer to

Definition at line 40 of file PostRepository.php.

References TYPO3\CMS\Extbase\Persistence\Repository\createQuery().

◆ findAllSortedByCategory()

TYPO3Tests\BlogExample\Domain\Repository\PostRepository::findAllSortedByCategory ( array  $uids)

◆ findByCategory()

TYPO3Tests\BlogExample\Domain\Repository\PostRepository::findByCategory ( int  $categoryUid)

Find posts by category

Definition at line 140 of file PostRepository.php.

References TYPO3\CMS\Extbase\Persistence\Repository\createQuery().

◆ findByTagAndBlog()

TYPO3Tests\BlogExample\Domain\Repository\PostRepository::findByTagAndBlog ( string  $tag,
Blog  $blog 
)

Finds posts by the specified tag and blog

Parameters
Blog$blog‪The blog the post must refer to

Definition at line 55 of file PostRepository.php.

References TYPO3\CMS\Extbase\Persistence\Repository\createQuery().

◆ findNext()

TYPO3Tests\BlogExample\Domain\Repository\PostRepository::findNext ( Post  $post)

Finds the post next to the given post

Parameters
Post$post‪The reference post

Definition at line 108 of file PostRepository.php.

References TYPO3\CMS\Extbase\Persistence\Repository\createQuery(), and TYPO3Tests\BlogExample\Domain\Model\Post\getDate().

◆ findPrevious()

TYPO3Tests\BlogExample\Domain\Repository\PostRepository::findPrevious ( Post  $post)

Finds the previous of the given post

Parameters
Post$post‪The reference post

Definition at line 92 of file PostRepository.php.

References TYPO3\CMS\Extbase\Persistence\Repository\createQuery(), and TYPO3Tests\BlogExample\Domain\Model\Post\getDate().

◆ findRecentByBlog()

QueryResultInterface TYPO3Tests\BlogExample\Domain\Repository\PostRepository::findRecentByBlog ( Blog  $blog,
int  $limit = 5 
)

Finds most recent posts by the specified blog

Parameters
Blog$blog‪The blog the post must refer to
int$limit‪The number of posts to return at max
Returns
‪QueryResultInterface The posts

Definition at line 126 of file PostRepository.php.

References TYPO3\CMS\Extbase\Persistence\Repository\createQuery().

◆ findRemaining()

TYPO3Tests\BlogExample\Domain\Repository\PostRepository::findRemaining ( Post  $post)

Member Data Documentation

◆ $defaultOrderings

TYPO3Tests\BlogExample\Domain\Repository\PostRepository::$defaultOrderings = array( 'date' => QueryInterface::ORDER_DESCENDING )
protected

Definition at line 33 of file PostRepository.php.