Repository and queries · Question 8 of 12

By convention, what is the name and location of the repository for the model MyVendor\MyExtension\Domain\Model\Conference?

1 answer is correct. Easy

Show answer

Answer

  • C Classes/Domain/Repository/ConferenceRepository.php with the class ConferenceRepository

Explanation

Extbase links model and repository by name: Domain\Model\Conference maps to Domain\Repository\ConferenceRepository. The repository extends \TYPO3\CMS\Extbase\Persistence\Repository and is often an empty class such as class ConferenceRepository extends Repository {} – the base class provides the standard methods like findAll(). The repository is the only entry point to the database for this model type; controllers and services should not run their own SQL queries. If the class is placed in the model folder, its namespace does not match the convention.

Certifications & exams

Which exam comes next?

You can already practise for 19 exams, and 21 are up for a vote. See all certifications with their official information, cast your vote or suggest your exam.

See all certifications