@@ -10,13 +10,16 @@ |
||
| 10 | 10 | |
| 11 | 11 | class HtmlLabel extends HtmlSemDoubleElement { |
| 12 | 12 | use LabeledIconTrait; |
| 13 | + |
|
| 14 | + /** |
|
| 15 | + * @param string $identifier |
|
| 16 | + */ |
|
| 13 | 17 | public function __construct($identifier,$caption="",$tagName="div") { |
| 14 | 18 | parent::__construct($identifier,$tagName,"ui label"); |
| 15 | 19 | $this->content=$caption; |
| 16 | 20 | } |
| 17 | 21 | |
| 18 | 22 | /** |
| 19 | - * @param string $side |
|
| 20 | 23 | * @return \Ajax\semantic\html\elements\HtmlLabel |
| 21 | 24 | */ |
| 22 | 25 | public function setPointing($value=Direction::NONE){ |
@@ -10,8 +10,8 @@ discard block |
||
| 10 | 10 | |
| 11 | 11 | class HtmlLabel extends HtmlSemDoubleElement { |
| 12 | 12 | use LabeledIconTrait; |
| 13 | - public function __construct($identifier,$caption="",$tagName="div") { |
|
| 14 | - parent::__construct($identifier,$tagName,"ui label"); |
|
| 13 | + public function __construct($identifier, $caption="", $tagName="div") { |
|
| 14 | + parent::__construct($identifier, $tagName, "ui label"); |
|
| 15 | 15 | $this->content=$caption; |
| 16 | 16 | } |
| 17 | 17 | |
@@ -19,33 +19,33 @@ discard block |
||
| 19 | 19 | * @param string $side |
| 20 | 20 | * @return \Ajax\semantic\html\elements\HtmlLabel |
| 21 | 21 | */ |
| 22 | - public function setPointing($value=Direction::NONE){ |
|
| 23 | - return $this->addToPropertyCtrl("class", $value." pointing",Direction::getConstantValues("pointing")); |
|
| 22 | + public function setPointing($value=Direction::NONE) { |
|
| 23 | + return $this->addToPropertyCtrl("class", $value." pointing", Direction::getConstantValues("pointing")); |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | /** |
| 27 | 27 | * @param string $side |
| 28 | 28 | * @return \Ajax\semantic\html\elements\HtmlLabel |
| 29 | 29 | */ |
| 30 | - public function toCorner($side="left"){ |
|
| 31 | - return $this->addToPropertyCtrl("class", $side." corner",array("right corner","left corner")); |
|
| 30 | + public function toCorner($side="left") { |
|
| 31 | + return $this->addToPropertyCtrl("class", $side." corner", array("right corner", "left corner")); |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | /** |
| 35 | 35 | * @return \Ajax\semantic\html\elements\HtmlLabel |
| 36 | 36 | */ |
| 37 | - public function asTag(){ |
|
| 37 | + public function asTag() { |
|
| 38 | 38 | return $this->addToProperty("class", "tag"); |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | /** |
| 42 | 42 | * @return \Ajax\semantic\html\elements\HtmlLabel |
| 43 | 43 | */ |
| 44 | - public function asLink(){ |
|
| 44 | + public function asLink() { |
|
| 45 | 45 | return $this->setTagName("a"); |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | - public function setBasic(){ |
|
| 48 | + public function setBasic() { |
|
| 49 | 49 | return $this->addToProperty("class", "basic"); |
| 50 | 50 | } |
| 51 | 51 | |
@@ -56,17 +56,17 @@ discard block |
||
| 56 | 56 | * @param string $before |
| 57 | 57 | * @return \Ajax\semantic\html\elements\HtmlLabel |
| 58 | 58 | */ |
| 59 | - public function addImage($src,$alt="",$before=true){ |
|
| 59 | + public function addImage($src, $alt="", $before=true) { |
|
| 60 | 60 | $this->addToProperty("class", "image"); |
| 61 | - return $this->addContent(new HtmlImg("image-".$this->identifier,$src,$alt),$before); |
|
| 61 | + return $this->addContent(new HtmlImg("image-".$this->identifier, $src, $alt), $before); |
|
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | /** |
| 65 | 65 | * @param string $detail |
| 66 | 66 | * @return \Ajax\common\html\HtmlDoubleElement |
| 67 | 67 | */ |
| 68 | - public function addDetail($detail){ |
|
| 69 | - $div=new HtmlDoubleElement("detail-".$this->identifier,$this->tagName); |
|
| 68 | + public function addDetail($detail) { |
|
| 69 | + $div=new HtmlDoubleElement("detail-".$this->identifier, $this->tagName); |
|
| 70 | 70 | $div->setClass("detail"); |
| 71 | 71 | $div->setContent($detail); |
| 72 | 72 | $this->addContent($div); |
@@ -7,11 +7,11 @@ |
||
| 7 | 7 | |
| 8 | 8 | class HtmlInput extends HtmlSingleElement { |
| 9 | 9 | |
| 10 | - public function __construct($identifier,$type="text",$value="",$placeholder="") { |
|
| 10 | + public function __construct($identifier, $type="text", $value="", $placeholder="") { |
|
| 11 | 11 | parent::__construct($identifier, "input"); |
| 12 | 12 | $this->setProperty("name", $identifier); |
| 13 | 13 | $this->setProperty("value", $value); |
| 14 | - if(JString::isNotNull($placeholder)) |
|
| 14 | + if (JString::isNotNull($placeholder)) |
|
| 15 | 15 | $this->setProperty("placeholder", $placeholder); |
| 16 | 16 | $this->setProperty("type", $type); |
| 17 | 17 | } |
@@ -11,8 +11,9 @@ |
||
| 11 | 11 | parent::__construct($identifier, "input"); |
| 12 | 12 | $this->setProperty("name", $identifier); |
| 13 | 13 | $this->setProperty("value", $value); |
| 14 | - if(JString::isNotNull($placeholder)) |
|
| 15 | - $this->setProperty("placeholder", $placeholder); |
|
| 14 | + if(JString::isNotNull($placeholder)) { |
|
| 15 | + $this->setProperty("placeholder", $placeholder); |
|
| 16 | + } |
|
| 16 | 17 | $this->setProperty("type", $type); |
| 17 | 18 | } |
| 18 | 19 | |
@@ -6,30 +6,30 @@ discard block |
||
| 6 | 6 | use Ajax\semantic\html\base\constants\State; |
| 7 | 7 | use Ajax\semantic\html\base\constants\Direction; |
| 8 | 8 | |
| 9 | -class HtmlInput extends HtmlSemDoubleElement{ |
|
| 9 | +class HtmlInput extends HtmlSemDoubleElement { |
|
| 10 | 10 | private $_hasIcon=false; |
| 11 | 11 | |
| 12 | - public function __construct($identifier,$type="text",$value="",$placeholder=""){ |
|
| 13 | - parent::__construct("div-".$identifier,"div","ui input"); |
|
| 14 | - $this->content=new \Ajax\common\html\html5\HtmlInput($identifier,$type,$value,$placeholder); |
|
| 15 | - $this->_states=[State::DISABLED,State::FOCUS,State::ERROR,State::LOADING]; |
|
| 12 | + public function __construct($identifier, $type="text", $value="", $placeholder="") { |
|
| 13 | + parent::__construct("div-".$identifier, "div", "ui input"); |
|
| 14 | + $this->content=new \Ajax\common\html\html5\HtmlInput($identifier, $type, $value, $placeholder); |
|
| 15 | + $this->_states=[State::DISABLED, State::FOCUS, State::ERROR, State::LOADING]; |
|
| 16 | 16 | $this->_variations=[]; |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | - public function setFocus(){ |
|
| 19 | + public function setFocus() { |
|
| 20 | 20 | $this->addToProperty("class", State::FOCUS); |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | - public function addIcon($icon,$direction=Direction::LEFT){ |
|
| 24 | - if($this->_hasIcon===false){ |
|
| 23 | + public function addIcon($icon, $direction=Direction::LEFT) { |
|
| 24 | + if ($this->_hasIcon===false) { |
|
| 25 | 25 | $iconO=$icon; |
| 26 | - if(\is_string($icon)){ |
|
| 26 | + if (\is_string($icon)) { |
|
| 27 | 27 | $iconO=new HtmlIcon("icon-".$this->identifier, $icon); |
| 28 | 28 | } |
| 29 | 29 | $this->addToPropertyCtrl("class", $direction." icon", Direction::getConstantValues("icon")); |
| 30 | - $this->addContent($iconO,false); |
|
| 30 | + $this->addContent($iconO, false); |
|
| 31 | 31 | $this->_hasIcon=true; |
| 32 | - }else{ |
|
| 32 | + }else { |
|
| 33 | 33 | $iconO=$this->getIcon(); |
| 34 | 34 | $iconO->setIcon($icon); |
| 35 | 35 | $this->addToPropertyCtrl("class", $direction." icon", Direction::getConstantValues("icon")); |
@@ -37,49 +37,49 @@ discard block |
||
| 37 | 37 | return $iconO; |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | - public function getIcon(){ |
|
| 41 | - if(\is_array($this->content)){ |
|
| 42 | - foreach ($this->content as $item){ |
|
| 43 | - if($item instanceof HtmlIcon) |
|
| 40 | + public function getIcon() { |
|
| 41 | + if (\is_array($this->content)) { |
|
| 42 | + foreach ($this->content as $item) { |
|
| 43 | + if ($item instanceof HtmlIcon) |
|
| 44 | 44 | return $item; |
| 45 | 45 | } |
| 46 | 46 | } |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | - public function addLoading(){ |
|
| 50 | - if($this->_hasIcon===false){ |
|
| 49 | + public function addLoading() { |
|
| 50 | + if ($this->_hasIcon===false) { |
|
| 51 | 51 | throw new \Exception("Input must have an icon for showing a loader, use addIcon before"); |
| 52 | 52 | } |
| 53 | 53 | return $this->addToProperty("class", State::LOADING); |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | - public function addLabel($label,$direction=Direction::LEFT,$icon=NULL){ |
|
| 56 | + public function addLabel($label, $direction=Direction::LEFT, $icon=NULL) { |
|
| 57 | 57 | $labelO=$label; |
| 58 | - if(\is_object($label)===false){ |
|
| 59 | - $labelO=new HtmlLabel("label-".$this->identifier,$label); |
|
| 60 | - if(isset($icon)) |
|
| 58 | + if (\is_object($label)===false) { |
|
| 59 | + $labelO=new HtmlLabel("label-".$this->identifier, $label); |
|
| 60 | + if (isset($icon)) |
|
| 61 | 61 | $labelO->addIcon($icon); |
| 62 | - }else{ |
|
| 62 | + }else { |
|
| 63 | 63 | $labelO->addToPropertyCtrl("class", "label", array("label")); |
| 64 | 64 | } |
| 65 | 65 | $this->addToProperty("class", $direction." labeled"); |
| 66 | - $this->addContent($labelO,\strstr($direction,Direction::LEFT)!==false); |
|
| 66 | + $this->addContent($labelO, \strstr($direction, Direction::LEFT)!==false); |
|
| 67 | 67 | return $labelO; |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | - public function addLabelToCorner($label,$direction=Direction::LEFT,$icon=NULL){ |
|
| 71 | - return $this->addLabel($label,$direction." corner",$icon)->toCorner($direction); |
|
| 70 | + public function addLabelToCorner($label, $direction=Direction::LEFT, $icon=NULL) { |
|
| 71 | + return $this->addLabel($label, $direction." corner", $icon)->toCorner($direction); |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | - public function addAction($action,$direction=Direction::LEFT,$icon=NULL,$labeled=false){ |
|
| 74 | + public function addAction($action, $direction=Direction::LEFT, $icon=NULL, $labeled=false) { |
|
| 75 | 75 | $actionO=$action; |
| 76 | - if(\is_object($action)===false){ |
|
| 77 | - $actionO=new HtmlButton("action-".$this->identifier,$action); |
|
| 78 | - if(isset($icon)) |
|
| 79 | - $actionO->addIcon($icon,true,$labeled); |
|
| 76 | + if (\is_object($action)===false) { |
|
| 77 | + $actionO=new HtmlButton("action-".$this->identifier, $action); |
|
| 78 | + if (isset($icon)) |
|
| 79 | + $actionO->addIcon($icon, true, $labeled); |
|
| 80 | 80 | } |
| 81 | 81 | $this->addToProperty("class", $direction." action"); |
| 82 | - $this->addContent($actionO,\strstr($direction,Direction::LEFT)!==false); |
|
| 82 | + $this->addContent($actionO, \strstr($direction, Direction::LEFT)!==false); |
|
| 83 | 83 | return $actionO; |
| 84 | 84 | } |
| 85 | 85 | |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | $this->addToPropertyCtrl("class", $direction." icon", Direction::getConstantValues("icon")); |
| 30 | 30 | $this->addContent($iconO,false); |
| 31 | 31 | $this->_hasIcon=true; |
| 32 | - }else{ |
|
| 32 | + } else{ |
|
| 33 | 33 | $iconO=$this->getIcon(); |
| 34 | 34 | $iconO->setIcon($icon); |
| 35 | 35 | $this->addToPropertyCtrl("class", $direction." icon", Direction::getConstantValues("icon")); |
@@ -40,8 +40,9 @@ discard block |
||
| 40 | 40 | public function getIcon(){ |
| 41 | 41 | if(\is_array($this->content)){ |
| 42 | 42 | foreach ($this->content as $item){ |
| 43 | - if($item instanceof HtmlIcon) |
|
| 44 | - return $item; |
|
| 43 | + if($item instanceof HtmlIcon) { |
|
| 44 | + return $item; |
|
| 45 | + } |
|
| 45 | 46 | } |
| 46 | 47 | } |
| 47 | 48 | } |
@@ -57,9 +58,10 @@ discard block |
||
| 57 | 58 | $labelO=$label; |
| 58 | 59 | if(\is_object($label)===false){ |
| 59 | 60 | $labelO=new HtmlLabel("label-".$this->identifier,$label); |
| 60 | - if(isset($icon)) |
|
| 61 | - $labelO->addIcon($icon); |
|
| 62 | - }else{ |
|
| 61 | + if(isset($icon)) { |
|
| 62 | + $labelO->addIcon($icon); |
|
| 63 | + } |
|
| 64 | + } else{ |
|
| 63 | 65 | $labelO->addToPropertyCtrl("class", "label", array("label")); |
| 64 | 66 | } |
| 65 | 67 | $this->addToProperty("class", $direction." labeled"); |
@@ -75,8 +77,9 @@ discard block |
||
| 75 | 77 | $actionO=$action; |
| 76 | 78 | if(\is_object($action)===false){ |
| 77 | 79 | $actionO=new HtmlButton("action-".$this->identifier,$action); |
| 78 | - if(isset($icon)) |
|
| 79 | - $actionO->addIcon($icon,true,$labeled); |
|
| 80 | + if(isset($icon)) { |
|
| 81 | + $actionO->addIcon($icon,true,$labeled); |
|
| 82 | + } |
|
| 80 | 83 | } |
| 81 | 84 | $this->addToProperty("class", $direction." action"); |
| 82 | 85 | $this->addContent($actionO,\strstr($direction,Direction::LEFT)!==false); |
@@ -17,37 +17,37 @@ |
||
| 17 | 17 | use BaseTrait; |
| 18 | 18 | protected $_popup=NULL; |
| 19 | 19 | |
| 20 | - public function __construct($identifier, $tagName="p",$baseClass="ui") { |
|
| 20 | + public function __construct($identifier, $tagName="p", $baseClass="ui") { |
|
| 21 | 21 | parent::__construct($identifier, $tagName); |
| 22 | 22 | $this->_baseClass=$baseClass; |
| 23 | 23 | $this->setClass($baseClass); |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | - public function setPopupAttributes($variation=NULL,$popupEvent=NULL){ |
|
| 27 | - if(isset($this->_popup)) |
|
| 28 | - $this->_popup->setAttributes($variation,$popupEvent); |
|
| 26 | + public function setPopupAttributes($variation=NULL, $popupEvent=NULL) { |
|
| 27 | + if (isset($this->_popup)) |
|
| 28 | + $this->_popup->setAttributes($variation, $popupEvent); |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | - public function addPopup($title="",$content="",$variation=NULL,$params=array()){ |
|
| 32 | - $this->_popup=new InternalPopup($this,$title,$content,$variation,$params); |
|
| 31 | + public function addPopup($title="", $content="", $variation=NULL, $params=array()) { |
|
| 32 | + $this->_popup=new InternalPopup($this, $title, $content, $variation, $params); |
|
| 33 | 33 | return $this; |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | - public function addPopupHtml($html="",$variation=NULL,$params=array()){ |
|
| 36 | + public function addPopupHtml($html="", $variation=NULL, $params=array()) { |
|
| 37 | 37 | $this->_popup=new InternalPopup($this); |
| 38 | 38 | $this->_popup->setHtml($html); |
| 39 | - $this->_popup->setAttributes($variation,$params); |
|
| 39 | + $this->_popup->setAttributes($variation, $params); |
|
| 40 | 40 | return $this; |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | - public function compile(JsUtils $js=NULL, View $view=NULL){ |
|
| 44 | - if(isset($this->_popup)) |
|
| 43 | + public function compile(JsUtils $js=NULL, View $view=NULL) { |
|
| 44 | + if (isset($this->_popup)) |
|
| 45 | 45 | $this->_popup->compile(); |
| 46 | - return parent::compile($js,$view); |
|
| 46 | + return parent::compile($js, $view); |
|
| 47 | 47 | } |
| 48 | - public function run(JsUtils $js){ |
|
| 48 | + public function run(JsUtils $js) { |
|
| 49 | 49 | parent::run($js); |
| 50 | - if(isset($this->_popup)){ |
|
| 50 | + if (isset($this->_popup)) { |
|
| 51 | 51 | $this->_popup->run($js); |
| 52 | 52 | //$this->addEventsOnRun($js); |
| 53 | 53 | //return $this->_bsComponent; |
@@ -5,5 +5,5 @@ |
||
| 5 | 5 | use Ajax\common\BaseEnum; |
| 6 | 6 | |
| 7 | 7 | abstract class State extends BaseEnum { |
| 8 | - const ACTIVE="active",DISABLED="disabled",ERROR="error",FOCUS="focus",LOADING="loading"; |
|
| 8 | + const ACTIVE="active", DISABLED="disabled", ERROR="error", FOCUS="focus", LOADING="loading"; |
|
| 9 | 9 | } |
| 10 | 10 | \ No newline at end of file |
@@ -13,17 +13,17 @@ |
||
| 13 | 13 | * @param boolean $labeled |
| 14 | 14 | * @return \Ajax\semantic\html\elements\HtmlIcon |
| 15 | 15 | */ |
| 16 | - public function addIcon($icon,$before=true,$labeled=false){ |
|
| 16 | + public function addIcon($icon, $before=true, $labeled=false) { |
|
| 17 | 17 | $iconO=$icon; |
| 18 | - if(\is_string($icon)){ |
|
| 18 | + if (\is_string($icon)) { |
|
| 19 | 19 | $iconO=new HtmlIcon("icon-".$this->identifier, $icon); |
| 20 | 20 | } |
| 21 | - if($labeled!==false){ |
|
| 22 | - $direction=($before===true)?Direction::RIGHT:Direction::LEFT; |
|
| 21 | + if ($labeled!==false) { |
|
| 22 | + $direction=($before===true) ? Direction::RIGHT : Direction::LEFT; |
|
| 23 | 23 | $this->addToProperty("class", $direction." labeled icon"); |
| 24 | 24 | $this->tagName="div"; |
| 25 | 25 | } |
| 26 | - $this->addContent($iconO,$before); |
|
| 26 | + $this->addContent($iconO, $before); |
|
| 27 | 27 | return $iconO; |
| 28 | 28 | } |
| 29 | 29 | } |
| 30 | 30 | \ No newline at end of file |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | * @param string $identifier |
| 63 | 63 | * @param string $icon |
| 64 | 64 | */ |
| 65 | - public function htmlIcon($identifier,$icon){ |
|
| 65 | + public function htmlIcon($identifier, $icon) { |
|
| 66 | 66 | return $this->addHtmlComponent(new HtmlIcon($identifier, $icon)); |
| 67 | 67 | } |
| 68 | 68 | |
@@ -71,14 +71,14 @@ discard block |
||
| 71 | 71 | * @param string $size |
| 72 | 72 | * @param array $icons |
| 73 | 73 | */ |
| 74 | - public function htmlIconGroups($identifier,$size="",$icons=array()){ |
|
| 75 | - $group=new HtmlIconGroups($identifier,$size); |
|
| 76 | - if(JArray::isAssociative($icons)){ |
|
| 77 | - foreach ($icons as $icon=>$size){ |
|
| 78 | - $group->add($icon,$size); |
|
| 74 | + public function htmlIconGroups($identifier, $size="", $icons=array()) { |
|
| 75 | + $group=new HtmlIconGroups($identifier, $size); |
|
| 76 | + if (JArray::isAssociative($icons)) { |
|
| 77 | + foreach ($icons as $icon=>$size) { |
|
| 78 | + $group->add($icon, $size); |
|
| 79 | 79 | } |
| 80 | - }else{ |
|
| 81 | - foreach ($icons as $icon){ |
|
| 80 | + }else { |
|
| 81 | + foreach ($icons as $icon) { |
|
| 82 | 82 | $group->add($icon); |
| 83 | 83 | } |
| 84 | 84 | } |
@@ -90,8 +90,8 @@ discard block |
||
| 90 | 90 | * @param array $elements |
| 91 | 91 | * @param boolean $asIcons |
| 92 | 92 | */ |
| 93 | - public function htmlButtonGroups($identifier,$elements=array(),$asIcons=false){ |
|
| 94 | - return $this->addHtmlComponent(new HtmlButtonGroups($identifier, $elements,$asIcons)); |
|
| 93 | + public function htmlButtonGroups($identifier, $elements=array(), $asIcons=false) { |
|
| 94 | + return $this->addHtmlComponent(new HtmlButtonGroups($identifier, $elements, $asIcons)); |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | /** |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | * @param string $identifier |
| 100 | 100 | * @param string $content |
| 101 | 101 | */ |
| 102 | - public function htmlContainer($identifier,$content=""){ |
|
| 102 | + public function htmlContainer($identifier, $content="") { |
|
| 103 | 103 | return $this->addHtmlComponent(new HtmlContainer($identifier, $content)); |
| 104 | 104 | } |
| 105 | 105 | |
@@ -107,8 +107,8 @@ discard block |
||
| 107 | 107 | * @param string $identifier |
| 108 | 108 | * @param string $content |
| 109 | 109 | */ |
| 110 | - public function htmlDivider($identifier,$content="",$tagName="div"){ |
|
| 111 | - return $this->addHtmlComponent(new HtmlDivider($identifier, $content,$tagName)); |
|
| 110 | + public function htmlDivider($identifier, $content="", $tagName="div") { |
|
| 111 | + return $this->addHtmlComponent(new HtmlDivider($identifier, $content, $tagName)); |
|
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | /** |
@@ -116,32 +116,32 @@ discard block |
||
| 116 | 116 | * @param string $content |
| 117 | 117 | * @param string $tagName |
| 118 | 118 | */ |
| 119 | - public function htmlLabel($identifier,$content="",$tagName="div"){ |
|
| 120 | - return $this->addHtmlComponent(new HtmlLabel($identifier, $content,$tagName)); |
|
| 119 | + public function htmlLabel($identifier, $content="", $tagName="div") { |
|
| 120 | + return $this->addHtmlComponent(new HtmlLabel($identifier, $content, $tagName)); |
|
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | /** |
| 124 | 124 | * @param string $identifier |
| 125 | 125 | * @param array $items |
| 126 | 126 | */ |
| 127 | - public function htmlMenu($identifier,$items=array()){ |
|
| 128 | - return $this->addHtmlComponent(new HtmlMenu($identifier,$items)); |
|
| 127 | + public function htmlMenu($identifier, $items=array()) { |
|
| 128 | + return $this->addHtmlComponent(new HtmlMenu($identifier, $items)); |
|
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | /**Adds an icon menu |
| 132 | 132 | * @param string $identifier |
| 133 | 133 | * @param array $items icons |
| 134 | 134 | */ |
| 135 | - public function htmlIconMenu($identifier,$items=array()){ |
|
| 136 | - return $this->addHtmlComponent(new HtmlIconMenu($identifier,$items)); |
|
| 135 | + public function htmlIconMenu($identifier, $items=array()) { |
|
| 136 | + return $this->addHtmlComponent(new HtmlIconMenu($identifier, $items)); |
|
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 | /**Adds an labeled icon menu |
| 140 | 140 | * @param string $identifier |
| 141 | 141 | * @param array $items icons |
| 142 | 142 | */ |
| 143 | - public function htmlLabeledIconMenu($identifier,$items=array()){ |
|
| 144 | - return $this->addHtmlComponent(new HtmlLabeledIconMenu($identifier,$items)); |
|
| 143 | + public function htmlLabeledIconMenu($identifier, $items=array()) { |
|
| 144 | + return $this->addHtmlComponent(new HtmlLabeledIconMenu($identifier, $items)); |
|
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | /** |
@@ -149,8 +149,8 @@ discard block |
||
| 149 | 149 | * @param string $value |
| 150 | 150 | * @param array $items |
| 151 | 151 | */ |
| 152 | - public function htmlDropdown($identifier, $value="", $items=array()){ |
|
| 153 | - return $this->addHtmlComponent(new HtmlDropdown($identifier,$value,$items)); |
|
| 152 | + public function htmlDropdown($identifier, $value="", $items=array()) { |
|
| 153 | + return $this->addHtmlComponent(new HtmlDropdown($identifier, $value, $items)); |
|
| 154 | 154 | } |
| 155 | 155 | |
| 156 | 156 | /** |
@@ -158,8 +158,8 @@ discard block |
||
| 158 | 158 | * @param string $identifier |
| 159 | 159 | * @param string $content |
| 160 | 160 | */ |
| 161 | - public function htmlMessage($identifier, $content=""){ |
|
| 162 | - return $this->addHtmlComponent(new HtmlMessage($identifier,$content)); |
|
| 161 | + public function htmlMessage($identifier, $content="") { |
|
| 162 | + return $this->addHtmlComponent(new HtmlMessage($identifier, $content)); |
|
| 163 | 163 | } |
| 164 | 164 | |
| 165 | 165 | /** |
@@ -167,8 +167,8 @@ discard block |
||
| 167 | 167 | * @param string $identifier |
| 168 | 168 | * @param string $content |
| 169 | 169 | */ |
| 170 | - public function htmlSegment($identifier, $content=""){ |
|
| 171 | - return $this->addHtmlComponent(new HtmlSegment($identifier,$content)); |
|
| 170 | + public function htmlSegment($identifier, $content="") { |
|
| 171 | + return $this->addHtmlComponent(new HtmlSegment($identifier, $content)); |
|
| 172 | 172 | } |
| 173 | 173 | |
| 174 | 174 | /** |
@@ -176,16 +176,16 @@ discard block |
||
| 176 | 176 | * @param string $identifier |
| 177 | 177 | * @param array $items the segments |
| 178 | 178 | */ |
| 179 | - public function htmlSegmentGroups($identifier, $items=array()){ |
|
| 180 | - return $this->addHtmlComponent(new HtmlSegmentGroups($identifier,$items)); |
|
| 179 | + public function htmlSegmentGroups($identifier, $items=array()) { |
|
| 180 | + return $this->addHtmlComponent(new HtmlSegmentGroups($identifier, $items)); |
|
| 181 | 181 | } |
| 182 | 182 | |
| 183 | 183 | /** |
| 184 | 184 | * @param string $identifier |
| 185 | 185 | * @param mixed $content |
| 186 | 186 | */ |
| 187 | - public function htmlPopup(BaseHtml $container,$identifier,$content){ |
|
| 188 | - return $this->addHtmlComponent(new HtmlPopup($container,$identifier,$content)); |
|
| 187 | + public function htmlPopup(BaseHtml $container, $identifier, $content) { |
|
| 188 | + return $this->addHtmlComponent(new HtmlPopup($container, $identifier, $content)); |
|
| 189 | 189 | } |
| 190 | 190 | |
| 191 | 191 | /** |
@@ -195,8 +195,8 @@ discard block |
||
| 195 | 195 | * @param boolean $createCols |
| 196 | 196 | * @param boolean $implicitRows |
| 197 | 197 | */ |
| 198 | - public function htmlGrid($identifier,$numRows=1,$numCols=NULL,$createCols=true,$implicitRows=false){ |
|
| 199 | - return $this->addHtmlComponent(new HtmlGrid($identifier,$numRows,$numCols,$createCols,$implicitRows)); |
|
| 198 | + public function htmlGrid($identifier, $numRows=1, $numCols=NULL, $createCols=true, $implicitRows=false) { |
|
| 199 | + return $this->addHtmlComponent(new HtmlGrid($identifier, $numRows, $numCols, $createCols, $implicitRows)); |
|
| 200 | 200 | } |
| 201 | 201 | |
| 202 | 202 | /** |
@@ -205,11 +205,11 @@ discard block |
||
| 205 | 205 | * @param mixed $content |
| 206 | 206 | * @param string $type |
| 207 | 207 | */ |
| 208 | - public function htmlHeader($identifier,$niveau=1,$content=NULL,$type="page"){ |
|
| 209 | - return $this->addHtmlComponent(new HtmlHeader($identifier,$niveau,$content,$type)); |
|
| 208 | + public function htmlHeader($identifier, $niveau=1, $content=NULL, $type="page") { |
|
| 209 | + return $this->addHtmlComponent(new HtmlHeader($identifier, $niveau, $content, $type)); |
|
| 210 | 210 | } |
| 211 | 211 | |
| 212 | - public function htmlInput($identifier,$type="text",$value="",$placeholder=""){ |
|
| 213 | - return $this->addHtmlComponent(new HtmlInput($identifier,$type,$value,$placeholder)); |
|
| 212 | + public function htmlInput($identifier, $type="text", $value="", $placeholder="") { |
|
| 213 | + return $this->addHtmlComponent(new HtmlInput($identifier, $type, $value, $placeholder)); |
|
| 214 | 214 | } |
| 215 | 215 | } |
| 216 | 216 | \ No newline at end of file |