29 'templateCollection' => self::convertTemplateCollectionToArray(
32 'fieldCollection' => self::convertFieldCollectionToArray(
48 foreach ($templateCollection as $template)
50 $result[$template->getType()] = $template->getTemplate();
65 foreach ($fieldCollection as $field)
68 'sort' => $field->getSort(),
69 'type' => $field->getType(),
70 'name' => $field->getName(),
71 'description' => $field->getDescription()
88 $result = (
new Format($languageId))
89 ->setName((
string)$data[
'name'])
90 ->setDescription((
string)$data[
'description'])
91 ->setDelimiter((
string)$data[
'delimiter'])
92 ->setCode((
string)$data[
'code'])
93 ->setFieldForUnRecognized($data[
'fieldForUnRecognized']);
95 foreach ($data[
'fieldCollection'] as $field)
99 ->setName((
string)$field[
'name'])
100 ->setDescription((
string)$field[
'description'])
101 ->setSort((
int)$field[
'sort'])
105 foreach ($data[
'templateCollection'] as $type => $template)
107 $result->getTemplateCollection()->addItem(