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

Public Member Functions

QueryResultInterface findAllByBlog (Blog $blog)
 
QueryResultInterface findByTagAndBlog ($tag, Blog $blog)
 
QueryResultInterface findRemaining (Post $post)
 
Post findPrevious (Post $post)
 
Post findNext (Post $post)
 
QueryResultInterface findRecentByBlog (Blog $blog, $limit=5)
 
QueryResultInterface findByCategory ($categoryUid)
 
 findAllSortedByCategory (array $uids)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Extbase\Persistence\Repository
 injectPersistenceManager (PersistenceManagerInterface $persistenceManager)
 
 __construct (ObjectManagerInterface $objectManager)
 
 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)
 
TYPO3 CMS Extbase Persistence QueryInterface createQuery ()
 
mixed __call ($methodName, $arguments)
 

Protected Attributes

 $defaultOrderings = array( 'date' => QueryInterface::ORDER_DESCENDING )
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Extbase\Persistence\Repository
TYPO3 CMS Extbase Persistence PersistenceManagerInterface $persistenceManager
 
TYPO3 CMS Extbase Object ObjectManagerInterface $objectManager
 
string $objectType
 
array $defaultOrderings = array( )
 
TYPO3 CMS Extbase Persistence Generic QuerySettingsInterface $defaultQuerySettings
 

Additional Inherited Members

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

Detailed Description

A repository for blog posts

@method Post findByUid($uid)

Definition at line 29 of file PostRepository.php.

Member Function Documentation

◆ findAllByBlog()

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

Finds all posts by the specified blog

Parameters
\ExtbaseTeam\BlogExample\Domain\Model\Blog$blog‪The blog the post must refer to
Returns
‪QueryResultInterface The posts

Definition at line 39 of file PostRepository.php.

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

◆ findAllSortedByCategory()

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

◆ findByCategory()

QueryResultInterface ExtbaseTeam\BlogExample\Domain\Repository\PostRepository::findByCategory (   $categoryUid)

Find posts by category

Parameters
int$categoryUid
Returns
‪QueryResultInterface

Definition at line 149 of file PostRepository.php.

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

◆ findByTagAndBlog()

QueryResultInterface ExtbaseTeam\BlogExample\Domain\Repository\PostRepository::findByTagAndBlog (   $tag,
Blog  $blog 
)

Finds posts by the specified tag and blog

Parameters
string$tag
\ExtbaseTeam\BlogExample\Domain\Model\Blog$blog‪The blog the post must refer to
Returns
‪QueryResultInterface The posts

Definition at line 56 of file PostRepository.php.

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

◆ findNext()

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

Finds the post next to the given post

Parameters
Post$post‪The reference post
Returns
‪Post

Definition at line 114 of file PostRepository.php.

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

◆ findPrevious()

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

Finds the previous of the given post

Parameters
Post$post‪The reference post
Returns
‪Post

Definition at line 97 of file PostRepository.php.

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

◆ findRecentByBlog()

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

Finds most recent posts by the specified blog

Parameters
\ExtbaseTeam\BlogExample\Domain\Model\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 132 of file PostRepository.php.

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

◆ findRemaining()

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

Finds all remaining posts of the blog

Parameters
Post$post‪The reference post
Returns
‪QueryResultInterface The posts

Definition at line 75 of file PostRepository.php.

References TYPO3\CMS\Extbase\Persistence\Repository\createQuery(), ExtbaseTeam\BlogExample\Domain\Model\Post\getBlog(), and TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\getUid().

Member Data Documentation

◆ $defaultOrderings

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

Definition at line 31 of file PostRepository.php.