55 $indexToInsert =
null;
56 $newFieldsList = array();
57 foreach ($this->elements as $key => $field)
59 if ($field === $targetField)
63 $newFieldsList[$newField->
getKey()] = $newField;
67 $newFieldsList[] = $newField;
70 $newFieldsList[$key] = $field;
73 $this->elements = $newFieldsList;
85 $indexToInsert =
null;
86 $newFieldsList = array();
87 foreach ($this->elements as $key => $field)
89 $newFieldsList[$key] = $field;
91 if ($field === $targetField)
95 $newFieldsList[$newField->
getKey()] = $newField;
99 $newFieldsList[] = $newField;
104 $this->elements = $newFieldsList;