Last active
December 20, 2015 22:19
-
-
Save tristanlins/6204381 to your computer and use it in GitHub Desktop.
[Avisota 2 Example] search for recipients
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// access the entity manager and get the recipient repository | |
/** @var \Contao\Doctrine\ORM\EntityHelper $entityManager */ | |
$entityManager = EntityHelper::getEntityManager(); | |
$repository = $entityManager->getRepository('Avisota\Contao:Recipient'); | |
// search recipient by email | |
/** @var \Avisota\Contao\Entity\Recipient $recipient */ | |
$recipient = $repository->findOneBy(array('email' => '[email protected]')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment