Skip to content

Commit

Permalink
ContentType Installer : add URL pattern and always available
Browse files Browse the repository at this point in the history
Signed-off-by: daverner <daverner@sqli.com>
  • Loading branch information
daverner committed Jun 4, 2020
1 parent f8a889c commit bc9782c
Showing 1 changed file with 23 additions and 17 deletions.
40 changes: 23 additions & 17 deletions Services/ExtractHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,25 +75,29 @@ public function createContentToExport( $aExportedIdentifiers, OutputInterface $o
$contentTypeGroups = $contentType->getContentTypeGroups();
//TODO : Voir si plus tard on peut faire autrement que prendre que le premier groupe
// On ne retourne alors que le premeir groupe auquel est associé le contentType
$contentTypeGroup = $contentTypeGroups[0];
$groupIdentifier = $contentTypeGroup->identifier;
$identifier = $contentType->identifier;
$names = $contentType->getNames();
$descriptions = $contentType->getDescriptions();
$mainLanguageCode = $contentType->mainLanguageCode;
$nameSchema = $contentType->nameSchema;
$fieldDefinitions = $contentType->getFieldDefinitions();
$isContainer = $contentType->isContainer;
$contentTypeGroup = $contentTypeGroups[0];
$groupIdentifier = $contentTypeGroup->identifier;
$identifier = $contentType->identifier;
$names = $contentType->getNames();
$descriptions = $contentType->getDescriptions();
$mainLanguageCode = $contentType->mainLanguageCode;
$nameSchema = $contentType->nameSchema;
$urlAliasSchema = $contentType->urlAliasSchema;
$defaultAlwaysAvailable = $contentType->defaultAlwaysAvailable;
$fieldDefinitions = $contentType->getFieldDefinitions();
$isContainer = $contentType->isContainer;
unset( $contentType );

$aContentType['group_identifier'] = $groupIdentifier;
$aContentType['identifier'] = $identifier;
$aContentType['names'] = $names;
$aContentType['descriptions'] = $descriptions;
$aContentType['mainLanguageCode'] = $mainLanguageCode;
$aContentType['nameSchema'] = $nameSchema;
$aContentType['fieldDefinitions'] = $fieldDefinitions;
$aContentType['isContainer'] = $isContainer;
$aContentType['group_identifier'] = $groupIdentifier;
$aContentType['identifier'] = $identifier;
$aContentType['names'] = $names;
$aContentType['descriptions'] = $descriptions;
$aContentType['mainLanguageCode'] = $mainLanguageCode;
$aContentType['nameSchema'] = $nameSchema;
$aContentType['urlAliasSchema'] = $urlAliasSchema;
$aContentType['defaultAlwaysAvailable'] = $defaultAlwaysAvailable;
$aContentType['fieldDefinitions'] = $fieldDefinitions;
$aContentType['isContainer'] = $isContainer;

$content[$identifier] = $this->createYMLFile( $aContentType, $output );
}
Expand All @@ -119,6 +123,8 @@ public function createYMLFile( $contentType, OutputInterface $output = null )
$content .= $this->extractInfosForYML( 'descriptions', $contentType['descriptions'], ' ' );
$content .= $this->extractInfosForYML( 'mainLanguageCode', $contentType['mainLanguageCode'], ' ' );
$content .= $this->extractInfosForYML( 'nameSchema', $contentType['nameSchema'], ' ' );
$content .= $this->extractInfosForYML( 'urlAliasSchema', $contentType['urlAliasSchema'], ' ' );
$content .= $this->extractInfosForYML( 'defaultAlwaysAvailable', $contentType['defaultAlwaysAvailable'], ' ' );
$content .= $this->extractInfosForYML( 'isContainer', $contentType['isContainer'], ' ' );
$content .= "\r\n";
$content .= " ";
Expand Down

0 comments on commit bc9782c

Please sign in to comment.