code: public function registerClientScript()
      {
          if ($this->closeIcon !== false) {
              $view = $this->getView();
              DosAmigosAsset::register($view);
              $view->registerJs("dosamigos.semantic.initMessageCloseButtons();");
          }
      }
docs: Initializes the message closing buttons