2323class CountTrackedSegment extends AbstractMatchCondition
2424{
2525 const OPTION_OPERATOR = 'operator ' ;
26+
2627 const OPTION_COUNT = 'count ' ;
28+
2729 const OPTION_SEGMENTS = 'segments ' ;
2830
29- /**
30- * @inheritdoc
31- */
3231 public function check (
3332 ConditionDefinitionInterface $ conditionDefinition ,
3433 CustomerInterface $ customer ,
@@ -60,19 +59,13 @@ public function check(
6059 return $ this ->matchCondition ($ trackedCount , $ options [self ::OPTION_OPERATOR ], (int )$ options [self ::OPTION_COUNT ]);
6160 }
6261
63- /**
64- * @inheritdoc
65- */
6662 public function getDbCondition (ConditionDefinitionInterface $ conditionDefinition )
6763 {
6864 //return a condition that does not match any customer since this condition can only be used
6965 //when assigned target group trigger appeared
7066 return '1=2 ' ;
7167 }
7268
73- /**
74- * @inheritdoc
75- */
7669 public static function createConditionDefinitionFromEditmode ($ setting )
7770 {
7871 $ segmentDataArray = $ setting ->options ->segments ;
@@ -89,9 +82,6 @@ public static function createConditionDefinitionFromEditmode($setting)
8982 return new \CustomerManagementFrameworkBundle \Model \ActionTrigger \ConditionDefinition ($ setting );
9083 }
9184
92- /**
93- * @inheritdoc
94- */
9585 public static function getDataForEditmode (ConditionDefinitionInterface $ conditionDefinition )
9686 {
9787 $ segmentManager = \Pimcore::getContainer ()->get ('cmf.segment_manager ' );
@@ -105,7 +95,7 @@ public static function getDataForEditmode(ConditionDefinitionInterface $conditio
10595 if ($ segment ) {
10696 $ dataSegments [] = [
10797 $ segment ->getId (),
108- $ segment ->getFullPath ()
98+ $ segment ->getFullPath (),
10999 ];
110100 }
111101 }
0 commit comments