public static function isAttributeChanged(Event $event, $attribute)
    {
        /** @var ActiveRecord $sender */
        $sender = $event->sender;
        if (!isset($event->changedAttributes)) {
            return $sender->isAttributeChanged($attribute);
        }
        return isset($event->changedAttributes[$attribute]);
    }