$visibleCondition = new \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Property\PropertyConditionChain(array($visibleCondition));
                    }
                }
                $visibleCondition->addCondition(new \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Property\NotCondition($boilerplateCondition));
                $visibleCondition->addCondition(new \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Property\PropertyCallbackCondition(function (\Contao\Doctrine\ORM\DataContainer\General\EntityModel $model = null) {
                    /** @var \Avisota\Contao\Entity\Message $message */
                    $message = $model->getEntity();
                    return $message->getCategory()->getQueueMode() == 'byMessageOrCategory';
                }));
                $property->setVisibleCondition($visibleCondition);
                break;
            case 'queue':
                $visibleCondition = $property->getVisibleCondition();
                if (!$visibleCondition) {
                    $visibleCondition = new \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Property\PropertyConditionChain();
                } else {
                    if (!$visibleCondition instanceof \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Property\PropertyConditionChain || $visibleCondition->getConjunction() != \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Property\PropertyConditionChain::AND_CONJUNCTION) {
                        $visibleCondition = new \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Property\PropertyConditionChain(array($visibleCondition));
                    }
                }
                $visibleCondition->addCondition(new \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Property\PropertyCallbackCondition(function (\Contao\Doctrine\ORM\DataContainer\General\EntityModel $model = null) {
                    /** @var \Avisota\Contao\Entity\Message $message */
                    $message = $model->getEntity();
                    $category = $message->getCategory();
                    return $category->getQueueMode() == 'byMessage' || $category->getQueueMode() == 'byMessageOrCategory' && $message->getSetQueue();
                }));
                $property->setVisibleCondition($visibleCondition);
                break;
        }
    }
})), 'metasubpalettes' => array('addFile' => array('files')), 'fields' => array('id' => array('field' => array('id' => true, 'type' => 'string', 'length' => '36', 'options' => array('fixed' => true))), 'createdAt' => array('field' => array('type' => 'datetime', 'nullable' => true, 'timestampable' => array('on' => 'create'))), 'updatedAt' => array('field' => array('type' => 'datetime', 'nullable' => true, 'timestampable' => array('on' => 'update'))), 'category' => array('label' => &$GLOBALS['TL_LANG']['orm_avisota_message']['category'], 'eval' => array('doNotShow' => true), 'manyToOne' => array('index' => true, 'targetEntity' => 'Avisota\\Contao\\Entity\\MessageCategory', 'cascade' => array('persist', 'detach', 'merge', 'refresh'), 'inversedBy' => 'messages', 'joinColumns' => array(array('name' => 'category', 'referencedColumnName' => 'id')))), 'contents' => array('label' => &$GLOBALS['TL_LANG']['orm_avisota_message']['contents'], 'eval' => array('doNotShow' => true), 'oneToMany' => array('targetEntity' => 'Avisota\\Contao\\Entity\\MessageContent', 'cascade' => array('all'), 'mappedBy' => 'message', 'orderBy' => array('cell' => 'ASC', 'sorting' => 'ASC'))), 'subject' => array('label' => &$GLOBALS['TL_LANG']['orm_avisota_message']['subject'], 'exclude' => true, 'search' => true, 'flag' => 1, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50', 'decodeEntities' => true)), 'alias' => array('label' => &$GLOBALS['TL_LANG']['orm_avisota_message']['alias'], 'exclude' => true, 'search' => true, 'inputType' => 'text', 'eval' => array('rgxp' => 'alnum', 'unique' => true, 'spaceToUnderscore' => true, 'maxlength' => 128, 'tl_class' => 'w50'), 'setter_callback' => array(array('Contao\\Doctrine\\ORM\\Helper', 'generateAlias'))), 'language' => array('label' => &$GLOBALS['TL_LANG']['orm_avisota_message']['language'], 'exclude' => true, 'filter' => true, 'flag' => 1, 'inputType' => 'select', 'options' => $this->getLanguages(), 'eval' => array('mandatory' => true, 'tl_class' => 'w50'), 'field' => array('type' => 'string', 'length' => 5, 'options' => array('fixed' => true))), 'description' => array('label' => &$GLOBALS['TL_LANG']['orm_avisota_message']['description'], 'exclude' => true, 'search' => true, 'inputType' => 'textarea', 'eval' => array('maxlength' => 255, 'rows' => 4)), 'keywords' => array('label' => &$GLOBALS['TL_LANG']['orm_avisota_message']['keywords'], 'exclude' => true, 'search' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'tl_class' => 'long')), 'setRecipients' => array('label' => &$GLOBALS['TL_LANG']['orm_avisota_message']['setRecipients'], 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'clr w50', 'submitOnChange' => true)), 'recipients' => array('label' => &$GLOBALS['TL_LANG']['orm_avisota_message']['recipients'], 'inputType' => 'select', 'options_callback' => \ContaoCommunityAlliance\Contao\Events\CreateOptions\CreateOptionsEventCallbackFactory::createCallback('avisota.create-recipient-source-options', 'Avisota\\Contao\\Core\\Event\\CreateOptionsEvent'), 'eval' => array('mandatory' => true, 'includeBlankOption' => true, 'tl_class' => 'w50'), 'manyToOne' => array('targetEntity' => 'Avisota\\Contao\\Entity\\RecipientSource', 'cascade' => array('persist', 'detach', 'merge', 'refresh'), 'joinColumns' => array(array('name' => 'recipientSource', 'referencedColumnName' => 'id')))), 'setLayout' => array('label' => &$GLOBALS['TL_LANG']['orm_avisota_message']['setLayout'], 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'clr m12 w50', 'submitOnChange' => true)), 'layout' => array('label' => &$GLOBALS['TL_LANG']['orm_avisota_message']['layout'], 'inputType' => 'select', 'options_callback' => \ContaoCommunityAlliance\Contao\Events\CreateOptions\CreateOptionsEventCallbackFactory::createCallback('avisota.create-layout-options', 'Avisota\\Contao\\Core\\Event\\CreateOptionsEvent'), 'eval' => array('mandatory' => true, 'includeBlankOption' => true, 'tl_class' => 'w50'), 'manyToOne' => array('targetEntity' => 'Avisota\\Contao\\Entity\\Layout', 'cascade' => array('persist', 'detach', 'merge', 'refresh'), 'joinColumns' => array(array('name' => 'layout', 'referencedColumnName' => 'id')))), 'setQueue' => array('label' => &$GLOBALS['TL_LANG']['orm_avisota_message']['setQueue'], 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'clr m12 w50', 'submitOnChange' => true)), 'queue' => array('label' => &$GLOBALS['TL_LANG']['orm_avisota_message']['queue'], 'inputType' => 'select', 'options_callback' => \ContaoCommunityAlliance\Contao\Events\CreateOptions\CreateOptionsEventCallbackFactory::createCallback('avisota.create-queue-options', 'Avisota\\Contao\\Core\\Event\\CreateOptionsEvent'), 'eval' => array('mandatory' => true, 'includeBlankOption' => true, 'tl_class' => 'w50'), 'manyToOne' => array('targetEntity' => 'Avisota\\Contao\\Entity\\Queue', 'cascade' => array('persist', 'detach', 'merge', 'refresh'), 'joinColumns' => array(array('name' => 'queue', 'referencedColumnName' => 'id')))), 'addFile' => array('label' => &$GLOBALS['TL_LANG']['orm_avisota_message']['addFile'], 'exclude' => true, 'filter' => true, 'inputType' => 'checkbox', 'eval' => array('submitOnChange' => true)), 'files' => array('label' => &$GLOBALS['TL_LANG']['orm_avisota_message']['files'], 'exclude' => true, 'inputType' => 'fileTree', 'eval' => array('fieldType' => 'checkbox', 'files' => true, 'filesOnly' => true, 'inputType' => 'checkbox', 'multiple' => true, 'mandatory' => true), 'field' => array()), 'sendOn' => array('label' => &$GLOBALS['TL_LANG']['orm_avisota_recipient']['sendOn'], 'filter' => true, 'sorting' => true, 'flag' => 7, 'eval' => array('doNotCopy' => true, 'doNotShow' => true), 'field' => array('type' => 'datetime', 'nullable' => true))));
 * Entity Avisota\Contao:RecipientSource
 */
$metaPalettes = array('recipients' => array('source' => array('title', 'alias', 'type'), 'details' => array('recipientsDetails'), 'filter' => array('filter', 'filterByMailingLists', 'recipientsUsePropertyFilter', function ($legendName, \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Legend $legend, \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Palette $palette, \ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\PalettesDefinitionInterface $palettesDefinition) {
    $filterByMailingListsProperty = $legend->getProperty('filterByMailingLists');
    $visibleCondition = $filterByMailingListsProperty->getVisibleCondition();
    $typeCondition = new \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Property\PropertyValueCondition('type', 'recipients');
    $filterCondition = new \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Property\PropertyTrueCondition('filter');
    /** @var \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Property\PropertyConditionInterface|\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Property\PropertyConditionChain $visibleCondition */
    if (!$visibleCondition || !$visibleCondition instanceof \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Property\PropertyConditionChain || $visibleCondition->getConjunction() != \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Property\PropertyConditionChain::OR_CONJUNCTION) {
        $visibleCondition = new \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Property\PropertyConditionChain($visibleCondition ? array($visibleCondition) : array(), \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Property\PropertyConditionChain::OR_CONJUNCTION);
    }
    $visibleCondition->addCondition(new \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Property\PropertyConditionChain(array($typeCondition, $filterCondition)));
    $filterByMailingListsProperty->setVisibleCondition($visibleCondition);
}, function ($legendName, \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Legend $legend, \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Palette $palette, \ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\PalettesDefinitionInterface $palettesDefinition) {
    $recipientsUsePropertyFilterProperty = $legend->getProperty('recipientsUsePropertyFilter');
    $visibleCondition = $recipientsUsePropertyFilterProperty->getVisibleCondition();
    $typeCondition = new \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Property\PropertyValueCondition('type', 'recipients');
    $filterCondition = new \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Property\PropertyTrueCondition('filter');
    /** @var \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Property\PropertyConditionInterface|\ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Property\PropertyConditionChain $visibleCondition */
    if (!$visibleCondition || !$visibleCondition instanceof \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Property\PropertyConditionChain || $visibleCondition->getConjunction() != \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Property\PropertyConditionChain::AND_CONJUNCTION) {
        $visibleCondition = new \ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\Condition\Property\PropertyConditionChain($visibleCondition ? array($visibleCondition) : array());
    }
    $visibleCondition->addCondition($typeCondition);
    $visibleCondition->addCondition($filterCondition);
    $recipientsUsePropertyFilterProperty->setVisibleCondition($visibleCondition);
}), 'expert' => array('disable')));
$TL_DCA['orm_avisota_recipient_source']['metapalettes'] = array_merge($TL_DCA['orm_avisota_recipient_source']['metapalettes'], $metaPalettes);
$metaSubPalettes = array('recipientsUsePropertyFilter' => array('recipientsPropertyFilter'));
$TL_DCA['orm_avisota_recipient_source']['metasubpalettes'] = array_merge($TL_DCA['orm_avisota_recipient_source']['metasubpalettes'], $metaSubPalettes);
$fields = array('recipientsManageSubscriptionPage' => array('label' => &$GLOBALS['TL_LANG']['orm_avisota_recipient_source']['recipientsManageSubscriptionPage'], 'inputType' => 'pageTree', 'eval' => array('mandatory' => false, 'nullable' => true)), 'recipientsUnsubscribePage' => array('label' => &$GLOBALS['TL_LANG']['orm_avisota_recipient_source']['recipientsUnsubscribePage'], 'inputType' => 'pageTree', 'eval' => array('mandatory' => false, 'nullable' => true)), 'recipientsDetails' => array('label' => &$GLOBALS['TL_LANG']['orm_avisota_recipient_source']['recipientsDetails'], 'default' => 'recipients_details', 'inputType' => 'select', 'options' => array('recipients_details', 'member_details', 'recipients_member_details'), 'reference' => &$GLOBALS['TL_LANG']['orm_avisota_recipient_source']['recipientsDetailsTypes'], 'eval' => array('mandatory' => true, 'tl_class' => 'w50'), 'field' => array('length' => '25', 'options' => array('fixed' => true), 'nullable' => true)), 'recipientsUsePropertyFilter' => array('label' => &$GLOBALS['TL_LANG']['orm_avisota_recipient_source']['recipientsUsePropertyFilter'], 'inputType' => 'checkbox', 'eval' => array('submitOnChange' => true), 'field' => array('nullable' => true)), 'recipientsPropertyFilter' => array('label' => &$GLOBALS['TL_LANG']['orm_avisota_recipient_source']['recipientsPropertyFilter'], 'inputType' => 'multiColumnWizard', 'eval' => array('mandatory' => true, 'columnFields' => array('recipientsPropertyFilter_property' => array('label' => &$GLOBALS['TL_LANG']['orm_avisota_recipient_source']['recipientsPropertyFilter_property'], 'inputType' => 'select', 'reference' => &$GLOBALS['TL_LANG']['orm_avisota_recipient'], 'eval' => array('style' => 'width:200px')), 'recipientsPropertyFilter_comparator' => array('label' => &$GLOBALS['TL_LANG']['orm_avisota_recipient_source']['recipientsPropertyFilter_comparator'], 'inputType' => 'select', 'options' => array('empty', 'not empty', 'eq', 'neq', 'gt', 'gte', 'lt', 'lte'), 'reference' => &$GLOBALS['TL_LANG']['orm_avisota_recipient_source']['recipientsPropertyFilter_comparators'], 'eval' => array('style' => 'width:100px')), 'recipientsPropertyFilter_value' => array('label' => &$GLOBALS['TL_LANG']['orm_avisota_recipient_source']['recipientsPropertyFilter_value'], 'inputType' => 'text', 'eval' => array('style' => 'width:200px')))), 'field' => array('type' => 'json_array', 'nullable' => true)));
$TL_DCA['orm_avisota_recipient_source']['fields'] = array_merge($TL_DCA['orm_avisota_recipient_source']['fields'], $fields);