@@ -30,38 +30,38 @@ discard block |
||
| 30 | 30 | * @param string|HtmlSemDoubleElement $header |
| 31 | 31 | * @return \Ajax\semantic\html\collections\HtmlMessage |
| 32 | 32 | */ |
| 33 | - public function addHeader($header){ |
|
| 33 | + public function addHeader($header) { |
|
| 34 | 34 | $headerO=$header; |
| 35 | - if(\is_string($header)){ |
|
| 36 | - $headerO=new HtmlSemDoubleElement("header-".$this->identifier,"div"); |
|
| 35 | + if (\is_string($header)) { |
|
| 36 | + $headerO=new HtmlSemDoubleElement("header-".$this->identifier, "div"); |
|
| 37 | 37 | $headerO->setClass("header"); |
| 38 | 38 | $headerO->setContent($header); |
| 39 | 39 | } |
| 40 | - return $this->addContent($headerO,true); |
|
| 40 | + return $this->addContent($headerO, true); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | - public function addList($elements,$ordered=false){ |
|
| 44 | - $list=new HtmlList("list-".$this->identifier,$elements); |
|
| 43 | + public function addList($elements, $ordered=false) { |
|
| 44 | + $list=new HtmlList("list-".$this->identifier, $elements); |
|
| 45 | 45 | $list->setOrdered($ordered); |
| 46 | 46 | $list->setClass("ui list"); |
| 47 | 47 | $this->addContent($list); |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | - public function setIcon($icon){ |
|
| 50 | + public function setIcon($icon) { |
|
| 51 | 51 | $this->addToProperty("class", "icon"); |
| 52 | - $this->wrapContent("<div class='content'>","</div>"); |
|
| 52 | + $this->wrapContent("<div class='content'>", "</div>"); |
|
| 53 | 53 | $this->icon=new HtmlIcon("icon-".$this->identifier, $icon); |
| 54 | 54 | return $this; |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | - public function addLoader($loaderIcon="notched circle"){ |
|
| 57 | + public function addLoader($loaderIcon="notched circle") { |
|
| 58 | 58 | $this->setIcon($loaderIcon); |
| 59 | 59 | $this->icon->addToIcon("loading"); |
| 60 | 60 | return $this; |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | - public function setDismissable($dismiss=true){ |
|
| 64 | - if($dismiss===true) |
|
| 63 | + public function setDismissable($dismiss=true) { |
|
| 64 | + if ($dismiss===true) |
|
| 65 | 65 | $this->close=new HtmlIcon("close-".$this->identifier, "close"); |
| 66 | 66 | else |
| 67 | 67 | $this->close=NULL; |
@@ -72,27 +72,27 @@ discard block |
||
| 72 | 72 | * {@inheritDoc} |
| 73 | 73 | * @see \Ajax\semantic\html\base\HtmlSemDoubleElement::run() |
| 74 | 74 | */ |
| 75 | - public function run(JsUtils $js){ |
|
| 75 | + public function run(JsUtils $js) { |
|
| 76 | 76 | parent::run($js); |
| 77 | - if(isset($this->close)){ |
|
| 77 | + if (isset($this->close)) { |
|
| 78 | 78 | $js->execOn("click", "#".$this->identifier." .close", "$(this).closest('.message').transition('fade')"); |
| 79 | 79 | } |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | - public function setState($visible=true){ |
|
| 83 | - $visible=($visible===true)?"visible":"hidden"; |
|
| 84 | - return $this->addToPropertyCtrl("class", $visible, array("visible","hidden")); |
|
| 82 | + public function setState($visible=true) { |
|
| 83 | + $visible=($visible===true) ? "visible" : "hidden"; |
|
| 84 | + return $this->addToPropertyCtrl("class", $visible, array("visible", "hidden")); |
|
| 85 | 85 | } |
| 86 | 86 | |
| 87 | - public function setVariation($value="floating"){ |
|
| 88 | - return $this->addToPropertyCtrl("class", $value, array("floating","compact")); |
|
| 87 | + public function setVariation($value="floating") { |
|
| 88 | + return $this->addToPropertyCtrl("class", $value, array("floating", "compact")); |
|
| 89 | 89 | } |
| 90 | 90 | |
| 91 | - public function setStyle($style){ |
|
| 91 | + public function setStyle($style) { |
|
| 92 | 92 | return $this->addToPropertyCtrl("class", $style, Style::getConstants()); |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | - public function setError(){ |
|
| 95 | + public function setError() { |
|
| 96 | 96 | return $this->setStyle("error"); |
| 97 | 97 | } |
| 98 | 98 | } |
| 99 | 99 | \ No newline at end of file |