27 $this->_template =
'<%tagName% id="%identifier%" %properties%>%close%%icon%%wrapContentBefore%%content%%wrapContentAfter%</%tagName%>';
40 if (\is_string($header)) {
42 $headerO->setClass(
"header");
43 $headerO->setContent($header);
54 $this->
wrapContent(
"<div class='content'>",
"</div>");
55 if (\is_string(
$icon)) {
56 $this->icon =
new HtmlIcon(
"icon-" . $this->identifier,
$icon);
75 public function getOnClose($url, $responseElement =
"", $parameters = array()) {
76 if (isset($this->close)) {
77 $this->close->getOnClick($url, $responseElement, $parameters);
81 public function addLoader($loaderIcon =
"notched circle") {
83 $this->icon->addToIcon(
"loading");
88 if ($dismiss ===
true)
89 $this->close =
new HtmlIcon(
"close-" . $this->identifier,
"close");
101 if (! isset($this->_bsComponent)) {
102 if (isset($this->close)) {
103 $js->execOn(
"click",
"#" . $this->identifier .
" .close",
"$(this).closest('.message').transition({$this->_closeTransition}).trigger('close-message');");
105 if (isset($this->_timeout)) {
106 $js->exec(
"setTimeout(function() { $('#{$this->identifier}').transition({$this->_closeTransition}).trigger('close-message'); }, {$this->_timeout});",
true);
113 $visible = ($visible ===
true) ?
"visible" :
"hidden";
140 if (\is_array($this->content)) {
141 $this->content[\sizeof($this->content) - 1] = $message;
Semantic Message component.
setDismissable($dismiss=true)
addToProperty($name, $value, $separator=" ")
addContent($content, $before=false)
addHeader($header)
Adds an header to the message.
Base class for Semantic double elements.
getOnClose($url, $responseElement="", $parameters=array())
Performs a get to $url on the click event on close button and display it in $responseElement.
wrapContent($before, $after="")
setVariation($value="floating")
addLoader($loaderIcon="notched circle")
addToPropertyCtrl($name, $value, $typeCtrl)
__construct($identifier, $content="")