Attention
TYPO3 v9 has reached its end-of-life September 30th, 2021 and is not maintained by the community anymore. Looking for a stable version? Use the version switch on the top left.
You can order Extended Long Term Support (ELTS) here: TYPO3 ELTS.
Get Blog from the Repository¶
Lets take a look into the BlogRepository
and travel into the inner core of
our little action island.
<?php
namespace FriendsOfTYPO3\BlogExample\Domain\Repository;
class BlogRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
{
}
The BlogRepository
does not need any own code since all methods which are
most commonly used are already implemented in the parent class
\TYPO3\CMS\Extbase\Persistence\Repository
.
In the controller, you saw the call to findAll()
, to retrieve all
blog objects which is one of the methods available by default.
Note
Although you don't need to implement your own logic extbase expects an existing class.