1111/**
1212 * Semantic Button component
1313 * @see http://phpmv-ui.kobject.net/index/direct/main/31
14- * @see http://semantic-ui.com/elements/button.html * @author jc
14+ * @see http://semantic-ui.com/elements/button.html
15+ * @author jc
1516 * @version 1.001
1617 */
1718class HtmlButton extends HtmlSemDoubleElement {
@@ -38,7 +39,7 @@ public function __construct($identifier, $value="", $cssStyle=null, $onClick=nul
3839 /**
3940 * Set the button value
4041 * @param string $value
41- * @return \Ajax\semantic\html\ HtmlButton
42+ * @return HtmlButton
4243 */
4344 public function setValue ($ value ) {
4445 $ this ->content =$ value ;
@@ -48,7 +49,7 @@ public function setValue($value) {
4849 /**
4950 * define the button style
5051 * @param string|int $cssStyle
51- * @return \Ajax\semantic\html\ HtmlButton default : ""
52+ * @return HtmlButton default : ""
5253 */
5354 public function setStyle ($ cssStyle ) {
5455 return $ this ->addToProperty ("class " , $ cssStyle );
@@ -79,7 +80,7 @@ public function setAnimated($content, $animation="") {
7980 /**
8081 *
8182 * @param string|HtmlIcon $icon
82- * @return \Ajax\semantic\html\elements\ HtmlButton
83+ * @return HtmlButton
8384 */
8485 public function asIcon ($ icon ) {
8586 $ iconO =$ icon ;
@@ -101,7 +102,7 @@ public function asSubmit() {
101102 * @param string $label
102103 * @param boolean $before
103104 * @param string $icon
104- * @return \Ajax\semantic\html\elements\ HtmlLabel
105+ * @return HtmlLabel
105106 */
106107 public function addLabel ($ label , $ before =false , $ icon =NULL ) {
107108 $ this ->tagName ="div " ;
@@ -128,23 +129,23 @@ public function fromArray($array) {
128129
129130 /**
130131 * hint towards a positive consequence
131- * @return \Ajax\semantic\html\elements\ HtmlButton
132+ * @return HtmlButton
132133 */
133134 public function setPositive () {
134135 return $ this ->addToProperty ("class " , "positive " );
135136 }
136137
137138 /**
138139 * hint towards a negative consequence
139- * @return \Ajax\semantic\html\elements\ HtmlButton
140+ * @return HtmlButton
140141 */
141142 public function setNegative () {
142143 return $ this ->addToProperty ("class " , "negative " );
143144 }
144145
145146 /**
146147 * formatted to toggle on/off
147- * @return \Ajax\semantic\html\elements\ HtmlButton
148+ * @return HtmlButton
148149 */
149150 public function setToggle () {
150151 $ this ->onCreate ("$('# " .$ this ->identifier ."').state(); " );
@@ -153,15 +154,15 @@ public function setToggle() {
153154
154155 /**
155156 *
156- * @return \Ajax\semantic\html\elements\ HtmlButton
157+ * @return HtmlButton
157158 */
158159 public function setCircular () {
159160 return $ this ->addToProperty ("class " , "circular " );
160161 }
161162
162163 /**
163164 * button is less pronounced
164- * @return \Ajax\semantic\html\elements\ HtmlButton
165+ * @return HtmlButton
165166 */
166167 public function setBasic () {
167168 return $ this ->addToProperty ("class " , "basic " );
@@ -175,6 +176,13 @@ public function setLoading() {
175176 return $ this ->addToProperty ("class " , "loading " );
176177 }
177178
179+ /**
180+ * Returns a new social Button
181+ * @param string $identifier
182+ * @param string $social
183+ * @param string $value
184+ * @return HtmlButton
185+ */
178186 public static function social ($ identifier , $ social , $ value =NULL ) {
179187 if ($ value === NULL )
180188 $ value =\ucfirst ($ social );
@@ -183,18 +191,36 @@ public static function social($identifier, $social, $value=NULL) {
183191 return $ return ->addToPropertyCtrl ("class " , $ social , Social::getConstants ());
184192 }
185193
194+ /**
195+ * Returns a new labeled Button
196+ * @param string $identifier
197+ * @param string $value
198+ * @param string $icon
199+ * @param boolean $before
200+ * @return \Ajax\semantic\html\elements\HtmlButton
201+ */
186202 public static function labeled ($ identifier , $ value , $ icon , $ before =true ) {
187203 $ result =new HtmlButton ($ identifier , $ value );
188204 $ result ->addIcon ($ icon , $ before , true );
189205 return $ result ;
190206 }
191207
208+ /**
209+ * Returns a new icon Button
210+ * @param string $identifier
211+ * @param string $icon
212+ * @return HtmlButton
213+ */
192214 public static function icon ($ identifier , $ icon ) {
193215 $ result =new HtmlButton ($ identifier );
194216 $ result ->asIcon ($ icon );
195217 return $ result ;
196218 }
197219
220+ /**
221+ * {@inheritDoc}
222+ * @see HtmlSemDoubleElement::asLink()
223+ */
198224 public function asLink ($ href =NULL ,$ target =NULL ) {
199225 $ lnk =new HtmlLink ("lnk- " .$ this ->identifier ,$ href ,$ this ->content ,$ target );
200226 $ this ->content =$ lnk ;
0 commit comments