public function registerJs($view, $settings = [])
    {
        if ($this->settings || $settings) {
            $settings = Json::htmlEncode(array_merge($this->settings, $settings));
            $view->registerJs("jQuery.extend(jQuery.timeago.settings, $settings);", $view::POS_READY, 'timeagoOptions');
        }

        $view->registerJs("jQuery('time.timeago').timeago();", $view::POS_READY, 'timeago');
    }