@@ -432,7 +432,9 @@ protected function _getWebsitesMap()
432
432
}
433
433
434
434
/**
435
- * {@inheritdoc}
435
+ * @inheritdoc
436
+ * @param \Magento\Framework\DataObject $dataObject
437
+ * @return bool|string[]
436
438
*/
437
439
public function validateData (DataObject $ dataObject )
438
440
{
@@ -453,7 +455,6 @@ public function validateData(DataObject $dataObject)
453
455
*
454
456
* @param string $action
455
457
* @param string|int|float $discount
456
- *
457
458
* @return array Validation errors
458
459
*/
459
460
protected function validateDiscount ($ action , $ discount )
@@ -581,8 +582,7 @@ protected function _invalidateCache()
581
582
}
582
583
583
584
/**
584
- * {@inheritdoc}
585
- *
585
+ * @inheritdoc
586
586
* @return $this
587
587
*/
588
588
public function afterSave ()
@@ -612,8 +612,7 @@ public function reindex()
612
612
}
613
613
614
614
/**
615
- * {@inheritdoc}
616
- *
615
+ * @inheritdoc
617
616
* @return $this
618
617
*/
619
618
public function afterDelete ()
@@ -642,9 +641,9 @@ public function isRuleBehaviorChanged()
642
641
643
642
/**
644
643
* Get array with data differences
644
+ *
645
645
* @param array $array1
646
646
* @param array $array2
647
- *
648
647
* @return array
649
648
*/
650
649
protected function dataDiff ($ array1 , $ array2 )
@@ -663,6 +662,8 @@ protected function dataDiff($array1, $array2)
663
662
}
664
663
665
664
/**
665
+ * Get conditions field set id
666
+ *
666
667
* @param string $formName
667
668
* @return string
668
669
*/
@@ -674,79 +675,94 @@ public function getConditionsFieldSetId($formName = '')
674
675
//@codeCoverageIgnoreStart
675
676
676
677
/**
677
- * {@inheritdoc}
678
+ * @inheritdoc
679
+ * @return int|null
678
680
*/
679
681
public function getRuleId ()
680
682
{
681
683
return $ this ->getData (self ::RULE_ID );
682
684
}
683
685
684
686
/**
685
- * {@inheritdoc}
687
+ * @inheritdoc
688
+ * @param int $ruleId
689
+ * @return $this
686
690
*/
687
691
public function setRuleId ($ ruleId )
688
692
{
689
693
return $ this ->setData (self ::RULE_ID , $ ruleId );
690
694
}
691
695
692
696
/**
693
- * {@inheritdoc}
697
+ * @inheritdoc
698
+ * @return string
694
699
*/
695
700
public function getName ()
696
701
{
697
702
return $ this ->getData (self ::NAME );
698
703
}
699
704
700
705
/**
701
- * {@inheritdoc}
706
+ * @inheritdoc
707
+ * @param string $name
708
+ * @return $this
702
709
*/
703
710
public function setName ($ name )
704
711
{
705
712
return $ this ->setData (self ::NAME , $ name );
706
713
}
707
714
708
715
/**
709
- * {@inheritdoc}
716
+ * @inheritdoc
717
+ * @return string|null
710
718
*/
711
719
public function getDescription ()
712
720
{
713
721
return $ this ->getData (self ::DESCRIPTION );
714
722
}
715
723
716
724
/**
717
- * {@inheritdoc}
725
+ * @inheritdoc
726
+ * @param string $description
727
+ * @return $this
718
728
*/
719
729
public function setDescription ($ description )
720
730
{
721
731
return $ this ->setData (self ::DESCRIPTION , $ description );
722
732
}
723
733
724
734
/**
725
- * {@inheritdoc}
735
+ * @inheritdoc
736
+ * @return int
726
737
*/
727
738
public function getIsActive ()
728
739
{
729
740
return $ this ->getData (self ::IS_ACTIVE );
730
741
}
731
742
732
743
/**
733
- * {@inheritdoc}
744
+ * @inheritdoc
745
+ * @param int $isActive
746
+ * @return $this
734
747
*/
735
748
public function setIsActive ($ isActive )
736
749
{
737
750
return $ this ->setData (self ::IS_ACTIVE , $ isActive );
738
751
}
739
752
740
753
/**
741
- * {@inheritdoc}
754
+ * @inheritdoc
755
+ * @return \Magento\CatalogRule\Api\Data\ConditionInterface|null
742
756
*/
743
757
public function getRuleCondition ()
744
758
{
745
759
return $ this ->getRuleConditionConverter ()->arrayToDataModel ($ this ->getConditions ()->asArray ());
746
760
}
747
761
748
762
/**
749
- * {@inheritdoc}
763
+ * @inheritdoc
764
+ * @param \Magento\CatalogRule\Api\Data\ConditionInterface $condition
765
+ * @return $this
750
766
*/
751
767
public function setRuleCondition ($ condition )
752
768
{
@@ -757,70 +773,84 @@ public function setRuleCondition($condition)
757
773
}
758
774
759
775
/**
760
- * {@inheritdoc}
776
+ * @inheritdoc
777
+ * @return int|null
761
778
*/
762
779
public function getStopRulesProcessing ()
763
780
{
764
781
return $ this ->getData (self ::STOP_RULES_PROCESSING );
765
782
}
766
783
767
784
/**
768
- * {@inheritdoc}
785
+ * @inheritdoc
786
+ * @param int $isStopProcessing
787
+ * @return $this
769
788
*/
770
789
public function setStopRulesProcessing ($ isStopProcessing )
771
790
{
772
791
return $ this ->setData (self ::STOP_RULES_PROCESSING , $ isStopProcessing );
773
792
}
774
793
775
794
/**
776
- * {@inheritdoc}
795
+ * @inheritdoc
796
+ * @return int|null
777
797
*/
778
798
public function getSortOrder ()
779
799
{
780
800
return $ this ->getData (self ::SORT_ORDER );
781
801
}
782
802
783
803
/**
784
- * {@inheritdoc}
804
+ * @inheritdoc
805
+ * @param int $sortOrder
806
+ * @return $this
785
807
*/
786
808
public function setSortOrder ($ sortOrder )
787
809
{
788
810
return $ this ->setData (self ::SORT_ORDER , $ sortOrder );
789
811
}
790
812
791
813
/**
792
- * {@inheritdoc}
814
+ * @inheritdoc
815
+ * @return string
793
816
*/
794
817
public function getSimpleAction ()
795
818
{
796
819
return $ this ->getData (self ::SIMPLE_ACTION );
797
820
}
798
821
799
822
/**
800
- * {@inheritdoc}
823
+ * @inheritdoc
824
+ * @param string $action
825
+ * @return $this
801
826
*/
802
827
public function setSimpleAction ($ action )
803
828
{
804
829
return $ this ->setData (self ::SIMPLE_ACTION , $ action );
805
830
}
806
831
807
832
/**
808
- * {@inheritdoc}
833
+ * @inheritdoc
834
+ * @return float
809
835
*/
810
836
public function getDiscountAmount ()
811
837
{
812
838
return $ this ->getData (self ::DISCOUNT_AMOUNT );
813
839
}
814
840
815
841
/**
816
- * {@inheritdoc}
842
+ * @inheritdoc
843
+ * @param float $amount
844
+ * @return $this
817
845
*/
818
846
public function setDiscountAmount ($ amount )
819
847
{
820
848
return $ this ->setData (self ::DISCOUNT_AMOUNT , $ amount );
821
849
}
822
850
823
851
/**
852
+ * Get from date
853
+ *
824
854
* @return string
825
855
*/
826
856
public function getFromDate ()
@@ -829,6 +859,8 @@ public function getFromDate()
829
859
}
830
860
831
861
/**
862
+ * Get to date
863
+ *
832
864
* @return string
833
865
*/
834
866
public function getToDate ()
@@ -837,8 +869,7 @@ public function getToDate()
837
869
}
838
870
839
871
/**
840
- * {@inheritdoc}
841
- *
872
+ * @inheritdoc
842
873
* @return \Magento\CatalogRule\Api\Data\RuleExtensionInterface|null
843
874
*/
844
875
public function getExtensionAttributes ()
@@ -847,8 +878,7 @@ public function getExtensionAttributes()
847
878
}
848
879
849
880
/**
850
- * {@inheritdoc}
851
- *
881
+ * @inheritdoc
852
882
* @param \Magento\CatalogRule\Api\Data\RuleExtensionInterface $extensionAttributes
853
883
* @return $this
854
884
*/
@@ -858,6 +888,8 @@ public function setExtensionAttributes(RuleExtensionInterface $extensionAttribut
858
888
}
859
889
860
890
/**
891
+ * Get rule condition converter
892
+ *
861
893
* @return Data\Condition\Converter
862
894
* @deprecated 100.1.0
863
895
*/
0 commit comments