Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/monara/public_html/test.athavaneng.com/themes.php on line 99
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 226
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 227
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 228
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 229
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 230
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 231
index.php 0000644 00000000006 15073230101 0006350 0 ustar 00
*/
class NewsletterOptionsRepository extends Repository {
protected function getEntityClassName() {
return NewsletterOptionEntity::class;
}
/**
* @return NewsletterOptionEntity[]
*/
public function findWelcomeNotificationsForSegments(array $segmentIds): array {
return $this->entityManager->createQueryBuilder()
->select('no')
->from(NewsletterOptionEntity::class, 'no')
->join('no.newsletter', 'n')
->join('no.optionField', 'nof')
->where('n.deletedAt IS NULL')
->andWhere('n.type = :typeWelcome')
->andWhere('nof.name = :nameSegment')
->andWhere('no.value IN (:segmentIds)')
->setParameter('typeWelcome', NewsletterEntity::TYPE_WELCOME)
->setParameter('nameSegment', NewsletterOptionFieldEntity::NAME_SEGMENT)
->setParameter('segmentIds', $segmentIds)
->getQuery()->getResult();
}
/**
* @return NewsletterOptionEntity[]
*/
public function findAutomaticEmailsForSegments(array $segmentIds): array {
return $this->entityManager->createQueryBuilder()
->select('no')
->from(NewsletterOptionEntity::class, 'no')
->join('no.newsletter', 'n')
->join('no.optionField', 'nof')
->where('n.deletedAt IS NULL')
->andWhere('n.type = :typeAutomatic')
->andWhere('nof.name = :nameSegment')
->andWhere('no.value IN (:segmentIds)')
->setParameter('typeAutomatic', NewsletterEntity::TYPE_AUTOMATIC)
->setParameter('nameSegment', NewsletterOptionFieldEntity::NAME_SEGMENT)
->setParameter('segmentIds', $segmentIds)
->getQuery()->getResult();
}
/** @param int[] $ids */
public function deleteByNewsletterIds(array $ids): void {
$this->entityManager->createQueryBuilder()
->delete(NewsletterOptionEntity::class, 'o')
->where('o.newsletter IN (:ids)')
->setParameter('ids', $ids)
->getQuery()
->execute();
// delete was done via DQL, make sure the entities are also detached from the entity manager
$this->detachAll(function (NewsletterOptionEntity $entity) use ($ids) {
$newsletter = $entity->getNewsletter();
return $newsletter && in_array($newsletter->getId(), $ids, true);
});
}
}
NewsletterOptionFieldsRepository.php 0000644 00000000735 15073230101 0014026 0 ustar 00
*/
class NewsletterOptionFieldsRepository extends Repository {
protected function getEntityClassName() {
return NewsletterOptionFieldEntity::class;
}
}