@@ -17,7 +17,14 @@ discard block |
||
17 | 17 | |
18 | 18 | trait FormFieldAsTrait{ |
19 | 19 | |
20 | + /** |
|
21 | + * @param string $prefix |
|
22 | + */ |
|
20 | 23 | abstract protected function _getFieldIdentifier($prefix); |
24 | + |
|
25 | + /** |
|
26 | + * @param \Closure $callback |
|
27 | + */ |
|
21 | 28 | abstract public function setValueFunction($index,$callback); |
22 | 29 | abstract protected function _applyAttributes($element,&$attributes,$index); |
23 | 30 | abstract public function getIdentifier(); |
@@ -39,6 +46,10 @@ discard block |
||
39 | 46 | } |
40 | 47 | } |
41 | 48 | |
49 | + /** |
|
50 | + * @param \Closure $elementCallback |
|
51 | + * @param string $identifier |
|
52 | + */ |
|
42 | 53 | protected function _fieldAs($elementCallback,$index,$attributes=NULL,$identifier=null){ |
43 | 54 | $this->setValueFunction($index,function($value) use ($index,&$attributes,$elementCallback){ |
44 | 55 | $caption=$this->_instanceViewer->getCaption($index); |