@@ -22,6 +22,10 @@ discard block |
||
22 | 22 | trait FieldAsTrait{ |
23 | 23 | |
24 | 24 | abstract protected function _getFieldIdentifier($prefix); |
25 | + |
|
26 | + /** |
|
27 | + * @param \Closure $callback |
|
28 | + */ |
|
25 | 29 | abstract public function setValueFunction($index,$callback); |
26 | 30 | |
27 | 31 | /** |
@@ -47,6 +51,10 @@ discard block |
||
47 | 51 | |
48 | 52 | protected function _addRules($element,&$attributes){} |
49 | 53 | |
54 | + /** |
|
55 | + * @param \Closure $elementCallback |
|
56 | + * @param string $prefix |
|
57 | + */ |
|
50 | 58 | protected function _fieldAs($elementCallback,$index,$attributes=NULL,$prefix=null){ |
51 | 59 | $this->setValueFunction($index,function($value) use ($index,&$attributes,$elementCallback,$prefix){ |
52 | 60 | $name=$this->_instanceViewer->getFieldName($index)."[]"; |