[TASK] Move condition operations to class constants
authorOliver Eglseder <oliver.eglseder@in2code.de>
Thu, 3 Sep 2015 10:05:59 +0000 (12:05 +0200)
committerOliver Eglseder <oliver.eglseder@in2code.de>
Thu, 3 Sep 2015 10:05:59 +0000 (12:05 +0200)
Classes/Domain/Model/Condition.php
Configuration/TCA/tx_powermailcond_domain_model_condition.php

index 81c95d3..5e4ba9d 100644 (file)
@@ -39,6 +39,9 @@ use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
  */
 class Condition extends AbstractEntity {
 
+       const CONJUNCTION_OR = 'OR';
+       const CONJUNCTION_AND = 'AND';
+
        /**
         * @var \In2code\Powermail\Domain\Repository\FieldRepository
         * @inject
index f633d98..e661732 100644 (file)
@@ -163,13 +163,13 @@ return array(
                                        // OR
                                        array(
                                                'LLL:EXT:powermail_cond/Resources/Private/Language/locallang_db.xml:tx_powermailcond_conditions.conjunction.I.1',
-                                               'OR'
+                                               \In2code\PowermailCond\Domain\Model\Condition::CONJUNCTION_OR
                                        ),
 
                                        // AND
                                        array(
                                                'LLL:EXT:powermail_cond/Resources/Private/Language/locallang_db.xml:tx_powermailcond_conditions.conjunction.I.0',
-                                               'AND'
+                                               \In2code\PowermailCond\Domain\Model\Condition::CONJUNCTION_AND
                                        ),
                                ),
                                'size' => 1,
@@ -232,4 +232,4 @@ return array(
                        'displayCond' => 'FIELD:form:>:0'
                ),
        ),
-);
\ No newline at end of file
+);