Completed
Push — master ( 686575...778966 )
by Jean-Christophe
03:10
created
Ajax/semantic/widgets/base/FieldAsTrait.php 1 patch
Doc Comments   +19 added lines patch added patch discarded remove patch
@@ -26,9 +26,18 @@  discard block
 block discarded – undo
26 26
 trait FieldAsTrait{
27 27
 
28 28
 	abstract protected function _getFieldIdentifier($prefix,$name="");
29
+
30
+	/**
31
+	 * @param \Closure $callback
32
+	 */
29 33
 	abstract public function setValueFunction($index,$callback);
30 34
 	abstract protected function _getFieldName($index);
31 35
 	abstract protected function _getFieldCaption($index);
36
+
37
+	/**
38
+	 * @param HtmlButton $button
39
+	 * @param string $event
40
+	 */
32 41
 	abstract protected function _buttonAsSubmit(&$button,$event,$url,$responseElement=NULL);
33 42
 
34 43
 	/**
@@ -65,12 +74,19 @@  discard block
 block discarded – undo
65 74
 		}
66 75
 	}
67 76
 
77
+	/**
78
+	 * @param HtmlFormInput $field
79
+	 */
68 80
 	protected function _prepareFormFields(&$field,$name,&$attributes){
69 81
 		$field->setName($name);
70 82
 		$this->_addRules($field, $attributes);
71 83
 		return $field;
72 84
 	}
73 85
 
86
+	/**
87
+	 * @param \Closure $elementCallback
88
+	 * @param string $prefix
89
+	 */
74 90
 	protected function _fieldAs($elementCallback,$index,$attributes=NULL,$prefix=null){
75 91
 		$this->setValueFunction($index,function($value) use ($index,&$attributes,$elementCallback,$prefix){
76 92
 			$caption=$this->_getFieldCaption($index);
@@ -221,6 +237,9 @@  discard block
 block discarded – undo
221 237
 		}
222 238
 	}
223 239
 
240
+	/**
241
+	 * @param integer $index
242
+	 */
224 243
 	public function fieldAs($index,$type,$attributes=NULL){
225 244
 		$method="fieldAs".\ucfirst($type);
226 245
 		if(\method_exists($this, $method)){
Please login to merge, or discard this patch.