Skip to content

Commit

Permalink
Merge branch '1.11'
Browse files Browse the repository at this point in the history
  • Loading branch information
Marek Nocon committed Apr 11, 2018
2 parents beb382f + f4569a6 commit fa91b3f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/Form/Processor/ContentTypeFormProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

use eZ\Publish\API\Repository\ContentTypeService;
use eZ\Publish\API\Repository\Values\ContentType\ContentTypeDraft;
use eZ\Publish\API\Repository\Values\ContentType\FieldDefinition;
use eZ\Publish\API\Repository\Values\ContentType\FieldDefinitionCreateStruct;
use eZ\Publish\Core\Helper\FieldsGroups\FieldsGroupsList;
use EzSystems\RepositoryForms\Event\FormActionEvent;
Expand Down Expand Up @@ -168,7 +169,9 @@ private function resolveNewFieldDefinitionIdentifier(
int $startIndex,
string $fieldTypeIdentifier
): string {
$fieldDefinitionIdentifiers = array_column($contentTypeDraft->getFieldDefinitions(), 'identifier');
$fieldDefinitionIdentifiers = array_map(function (FieldDefinition $fieldDefinition) {
return $fieldDefinition->identifier;
}, $contentTypeDraft->getFieldDefinitions());

do {
$fieldDefinitionIdentifier = sprintf('new_%s_%d', $fieldTypeIdentifier, ++$startIndex);
Expand Down

0 comments on commit fa91b3f

Please sign in to comment.