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