@@ -16,7 +16,14 @@ discard block |
||
16 | 16 | |
17 | 17 | trait FormFieldAsTrait{ |
18 | 18 | |
19 | + /** |
|
20 | + * @param string $prefix |
|
21 | + */ |
|
19 | 22 | abstract protected function _getFieldIdentifier($prefix); |
23 | + |
|
24 | + /** |
|
25 | + * @param \Closure $callback |
|
26 | + */ |
|
20 | 27 | abstract public function setValueFunction($index,$callback); |
21 | 28 | |
22 | 29 | private function _getLabelField($caption,$icon=NULL){ |
@@ -47,6 +54,9 @@ discard block |
||
47 | 54 | $element->fromArray($attributes); |
48 | 55 | } |
49 | 56 | |
57 | + /** |
|
58 | + * @param \Closure $elementCallback |
|
59 | + */ |
|
50 | 60 | protected function _fieldAs($elementCallback,$index,$attributes=NULL){ |
51 | 61 | $this->setValueFunction($index,function($value)use ($index,&$attributes,$elementCallback){ |
52 | 62 | $caption=$this->_instanceViewer->getCaption($index); |