3.4 3.3
Jump to table of contents

Get Data

Your plugin may need to get data from the application, such as submissions, issues, authors, users and files. Use the Repo facade and Collector to retrieve information.

$currentUser = Application::get()->getUser();

$submissions = Repo::submission()
  ->getCollector()
  ->filterByContexts([$context->getId()])
  ->assignedTo([$currentUser->getId()])
  ->limit(20)
  ->getMany();

If a Repository does not exist for the data you want, you may need to use the DAO.

$authorDao = DAORegistry::getDAO('AuthorDAO');
$authors = $authorDao->getBySubmissionId($submissionId);

Learn more about Repositories, Entities and DAOs in our developer documentation.


View more examples.