From bc9782cdd54b00cfbc3bba76cfdd14aba9fb0378 Mon Sep 17 00:00:00 2001 From: daverner Date: Thu, 4 Jun 2020 16:04:54 +0200 Subject: [PATCH] ContentType Installer : add URL pattern and always available Signed-off-by: daverner --- Services/ExtractHelper.php | 40 ++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/Services/ExtractHelper.php b/Services/ExtractHelper.php index c83cc02..0e7fec2 100644 --- a/Services/ExtractHelper.php +++ b/Services/ExtractHelper.php @@ -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 ); } @@ -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 .= " ";