public function onConfirmationChanged($event)
    {
        $sender = $event->sender;
        $cAttribute = $sender->confirmationAttribute;
        if (!$cAttribute || empty($cAttribute)) {
            return;
        }
        if ($sender->isAttributeChanged($cAttribute)) {
            $sender->confirmCode = '';
            if ($sender->$cAttribute == static::$confirmFalse) {
                $sender->trigger(static::$eventConfirmationCanceled);
                return;
            }
            $sender->trigger(static::$eventConfirmationSuceeded);
            $sender->resetOthersConfirmation();
        }
    }
public function onConfirmationChanged($event)
    {
        $sender = $event->sender;
        $cAttribute = $sender->confirmationAttribute;
        if (!$cAttribute || empty($cAttribute)) {
            return;
        }
        if ($sender->isAttributeChanged($cAttribute)) {
            $sender->confirmCode = '';
            if ($sender->$cAttribute == static::$confirmFalse) {
                $sender->trigger(static::$eventConfirmationCanceled);
                return;
            }
            $sender->trigger(static::$eventConfirmationSuceeded);
            $sender->resetOthersConfirmation();
        }
    }
public function onConfirmationChanged ( $ event ) { $ sender = $ event -> sender ; $ cAttribute = $ sender -> confirmationAttribute ; if ( ! $ cAttribute || empty ( $ cAttribute ) ) { return ; } if ( $ sender -> isAttributeChanged ( $ cAttribute ) ) { $ sender -> confirmCode = '' ; if ( $ sender -> $ cAttribute == static :: $ confirmFalse ) { $ sender -> trigger ( static :: $ eventConfirmationCanceled ) ; return ; } $ sender -> trigger ( static :: $ eventConfirmationSuceeded ) ; $ sender -> resetOthersConfirmation ( ) ; } }
When confirmation status changed, this event will be triggered. If
confirmation succeeded, the confirm_time will be assigned to current time,
or the confirm_time will be assigned to initConfirmTime.
This method is ONLY used for being triggered by event. DO NOT call,
override or modify it directly, unless you know the consequences.
@param ModelEvent $event
When confirmation status changed this event will be triggered . If confirmation succeeded the confirm_time will be assigned to current time or the confirm_time will be assigned to initConfirmTime . This method is ONLY used for being triggered by event . DO NOT call override or modify it directly unless you know the consequences .