private function addWhereContexts(QueryBuilder $qb, $contexts = null): void
    {
        if (null !== $contexts) {
            $contexts = (array) $contexts;
            $where = 'p.contexts IS NULL';

            foreach ($contexts as $context) {
                $key = 'context_'.$context;
                $where .= sprintf(' OR p.contexts LIKE :%s', $key);
                $qb->setParameter($key, '%"'.$context.'"%');
            }

            $qb->andWhere($where);
        }
    }