16 $this->separators=[-1];
19 $this->defaultValueFunction=
function($name,$value,
$index){
21 $input=
new HtmlFormInput($this->widgetIdentifier.
"-".$name,$caption,
"text",$value);
22 $input->setName($name);
34 $field=\str_replace(
"\n",
"", $field);
35 if(($header=$this->
hasHeader($field))!==
false){
41 $matches=[];$result=
false;
42 if(\preg_match(
'/\{(.*?)\}/s', $field, $matches)===1){
44 $field=\str_replace(
"{".$result.
"}",
"", $field);
52 if(\array_search($fieldNum, $this->separators)===
false)
53 $this->separators[]=$fieldNum;
58 $this->headers[$fieldNum]=$header;
64 public function addWrapper($fieldNum,$contentBefore,$contentAfter=null){
65 $this->wrappers[$fieldNum]=[$contentBefore,$contentAfter];
74 \array_splice($this->separators,
$index,1);
78 parent::removeField(
$index);
79 $pos=\array_search(
$index, $this->separators);
81 $sepCount=\sizeof($this->separators);
82 for($i=$pos+1;$i<$sepCount;$i++){
83 $this->separators[$i]--;
85 \array_splice($this->separators, $pos, 1);
static startswith($hay, $needle)
static endswith($hay, $needle)