コード例 #1
0
ファイル: Notification.php プロジェクト: HomeRefill/mautic
 /**
  * @param $prop
  * @param $val
  */
 protected function isChanged($prop, $val)
 {
     $getter = "get" . ucfirst($prop);
     $current = $this->{$getter}();
     if ($prop == 'category' || $prop == 'list') {
         $currentId = $current ? $current->getId() : '';
         $newId = $val ? $val->getId() : null;
         if ($currentId != $newId) {
             $this->changes[$prop] = array($currentId, $newId);
         }
     } else {
         parent::isChanged($prop, $val);
     }
 }
コード例 #2
0
ファイル: LeadField.php プロジェクト: smotalima/mautic
 public function __clone()
 {
     $this->id = null;
     parent::__clone();
 }
コード例 #3
0
ファイル: Campaign.php プロジェクト: dongilbert/mautic
 public function __clone()
 {
     $this->leads = new ArrayCollection();
     $this->events = new ArrayCollection();
     $this->lists = new ArrayCollection();
     $this->forms = new ArrayCollection();
     $this->id = null;
     parent::__clone();
 }
コード例 #4
0
ファイル: Asset.php プロジェクト: Jandersolutions/mautic
 /**
  * @param $prop
  * @param $val
  */
 protected function isChanged($prop, $val)
 {
     $getter = "get" . ucfirst($prop);
     $current = $this->{$getter}();
     parent::isChanged($prop, $val);
 }
コード例 #5
0
ファイル: DynamicContent.php プロジェクト: Yame-/mautic
 /**
  * @param $prop
  * @param $val
  */
 protected function isChanged($prop, $val)
 {
     $getter = 'get' . ucfirst($prop);
     $current = $this->{$getter}();
     if ($prop == 'variantParent' || $prop == 'translationParent' || $prop == 'category') {
         $currentId = $current ? $current->getId() : '';
         $newId = $val ? $val->getId() : null;
         if ($currentId != $newId) {
             $this->changes[$prop] = [$currentId, $newId];
         }
     } else {
         parent::isChanged($prop, $val);
     }
 }