Skip to content

Commit d04c910

Browse files
committed
updates for new core releases
1 parent 72b96c0 commit d04c910

15 files changed

Lines changed: 35 additions & 39 deletions

File tree

bundles/org.zikula.modulestudio.generator/src/org/zikula/modulestudio/generator/cartridges/zclassic/controller/FormHandler.xtend

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ class FormHandler {
6565
new ArrayType().generate(it, fsa)
6666
new ArrayFieldTransformer().generate(it, fsa)
6767
}
68-
if (hasColourFields && !targets('2.0-dev')) {
68+
if (hasColourFields && !targets('2.0')) {
6969
new ColourType().generate(it, fsa)
7070
}
71-
if (hasTelephoneFields && !targets('2.0-dev')) {
71+
if (hasTelephoneFields && !targets('2.0')) {
7272
new TelType().generate(it, fsa)
7373
}
7474
if (hasUploads) {

bundles/org.zikula.modulestudio.generator/src/org/zikula/modulestudio/generator/cartridges/zclassic/controller/ServiceDefinitions.xtend

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ class ServiceDefinitions {
411411
- { name: form.type }
412412
«ENDIF»
413413
«ENDIF»
414-
«IF hasColourFields && !targets('2.0-dev'
414+
«IF hasColourFields && !targets('2.0'
415415

416416
«modPrefix».form.type.field.colour:
417417
class: «nsBase»Field\ColourType
@@ -446,7 +446,7 @@ class ServiceDefinitions {
446446
- { name: form.type }
447447
«ENDIF»
448448
«ENDIF»
449-
«IF hasTelephoneFields && !targets('2.0-dev'
449+
«IF hasTelephoneFields && !targets('2.0'
450450

451451
«modPrefix».form.type.field.tel:
452452
class: «nsBase»Field\TelType

bundles/org.zikula.modulestudio.generator/src/org/zikula/modulestudio/generator/cartridges/zclassic/controller/formtype/BlockListType.xtend

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,8 @@ class BlockListType {
195195
'multiple' => $hasMultiSelection,
196196
'module' => '«appName»',
197197
'entity' => ucfirst($options['object_type']) . 'Entity',
198-
'entityCategoryClass' => '«appNamespace»\Entity\\' . ucfirst($options['object_type']) . 'CategoryEntity'«IF targets('2.0-dev') || (!targets('2.0') && targets('1.5-dev'))»,
199-
'showRegistryLabels' => true«ENDIF»
198+
'entityCategoryClass' => '«appNamespace»\Entity\\' . ucfirst($options['object_type']) . 'CategoryEntity',
199+
'showRegistryLabels' => true
200200
]);
201201
}
202202
'''

bundles/org.zikula.modulestudio.generator/src/org/zikula/modulestudio/generator/cartridges/zclassic/controller/formtype/EditEntityType.xtend

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,8 +546,8 @@ class EditEntityType {
546546
'multiple' => «categorisableMultiSelection.displayBool»,
547547
'module' => '«app.appName»',
548548
'entity' => '«name.formatForCodeCapital»Entity',
549-
'entityCategoryClass' => '«app.appNamespace»\Entityname.formatForCodeCapital»CategoryEntity'«IF app.targets('2.0-dev') || (!app.targets('2.0') && app.targets('1.5-dev'))»,
550-
'showRegistryLabels' => true«ENDIF»
549+
'entityCategoryClass' => '«app.appNamespace»\Entityname.formatForCodeCapital»CategoryEntity',
550+
'showRegistryLabels' => true
551551
]);
552552
}
553553
'''

bundles/org.zikula.modulestudio.generator/src/org/zikula/modulestudio/generator/cartridges/zclassic/controller/formtype/FinderType.xtend

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ class FinderType {
205205
'multiple' => «categorisableMultiSelection.displayBool»,
206206
'module' => '«app.appName»',
207207
'entity' => ucfirst($options['object_type']) . 'Entity',
208-
'entityCategoryClass' => '«app.appNamespace»\Entity\\' . ucfirst($options['object_type']) . 'CategoryEntity'«IF app.targets('2.0-dev') || (!app.targets('2.0') && app.targets('1.5-dev'))»,
209-
'showRegistryLabels' => true«ENDIF»
208+
'entityCategoryClass' => '«app.appNamespace»\Entity\\' . ucfirst($options['object_type']) . 'CategoryEntity',
209+
'showRegistryLabels' => true
210210
]);
211211
}
212212
'''

bundles/org.zikula.modulestudio.generator/src/org/zikula/modulestudio/generator/cartridges/zclassic/controller/formtype/QuickNavigationType.xtend

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,8 @@ class QuickNavigationType {
328328
'multiple' => «categorisableMultiSelection.displayBool»,
329329
'module' => '«app.appName»',
330330
'entity' => ucfirst($objectType) . 'Entity',
331-
'entityCategoryClass' => '«app.appNamespace»\Entity\\' . ucfirst($objectType) . 'CategoryEntity'«IF app.targets('2.0-dev') || (!app.targets('2.0') && app.targets('1.5-dev'))»,
332-
'showRegistryLabels' => true«ENDIF»
331+
'entityCategoryClass' => '«app.appNamespace»\Entity\\' . ucfirst($objectType) . 'CategoryEntity',
332+
'showRegistryLabels' => true
333333
]);
334334
}
335335
'''

bundles/org.zikula.modulestudio.generator/src/org/zikula/modulestudio/generator/cartridges/zclassic/controller/formtype/SharedFormTypeFields.xtend

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class SharedFormTypeFields {
5858
«IF !fields.filter(ListField).filter[!multiple].empty»
5959
use «nsSymfonyFormType»ChoiceType;
6060
«ENDIF»
61-
«IF !fields.filter(StringField).filter[role == StringRole.COLOUR].empty && app.targets('2.0-dev'
61+
«IF !fields.filter(StringField).filter[role == StringRole.COLOUR].empty && app.targets('2.0'
6262
use «nsSymfonyFormType»ColorType;
6363
«ENDIF»
6464
«IF !fields.filter(StringField).filter[role == StringRole.COUNTRY].empty»
@@ -108,7 +108,7 @@ class SharedFormTypeFields {
108108
«ENDIF»
109109
use «nsSymfonyFormType»ResetType;
110110
use «nsSymfonyFormType»SubmitType;
111-
«IF !fields.filter(StringField).filter[role == StringRole.PHONE_NUMBER].empty && app.targets('2.0-dev'
111+
«IF !fields.filter(StringField).filter[role == StringRole.PHONE_NUMBER].empty && app.targets('2.0'
112112
use «nsSymfonyFormType»TelType;
113113
«ENDIF»
114114
«IF !fields.filter(TextField).empty || (null !== dataObject && dataObject instanceof Entity && (dataObject as Entity).workflow != EntityWorkflowType.NONE
@@ -169,7 +169,7 @@ class SharedFormTypeFields {
169169
«IF !fields.filter(ArrayField).empty»
170170
use «app.appNamespace»\Form\Type\Field\ArrayType;
171171
«ENDIF»
172-
«IF !fields.filter(StringField).filter[role == StringRole.COLOUR].empty && !app.targets('2.0-dev'
172+
«IF !fields.filter(StringField).filter[role == StringRole.COLOUR].empty && !app.targets('2.0'
173173
use «app.appNamespace»\Form\Type\Field\ColourType;
174174
«ENDIF»
175175
«IF null !== dataObject && dataObject instanceof Entity && (dataObject as Entity).geographical»
@@ -178,7 +178,7 @@ class SharedFormTypeFields {
178178
«IF !fields.filter(ListField).filter[multiple].empty»
179179
use «app.appNamespace»\Form\Type\Field\MultiListType;
180180
«ENDIF»
181-
«IF !fields.filter(StringField).filter[role == StringRole.PHONE_NUMBER].empty && !app.targets('2.0-dev'
181+
«IF !fields.filter(StringField).filter[role == StringRole.PHONE_NUMBER].empty && !app.targets('2.0'
182182
use «app.appNamespace»\Form\Type\Field\TelType;
183183
«ENDIF»
184184
«IF null !== dataObject && dataObject instanceof Entity && (dataObject as Entity).hasTranslatableFields»
@@ -453,7 +453,7 @@ class SharedFormTypeFields {
453453
messages += '''$this->__f('Note: the image must have a height of at most %max% pixels.', ['%max%' => «maxHeight»])'''
454454
}
455455

456-
if (application.targets('2.0-dev')) {
456+
if (application.targets('2.0')) {
457457
if (minPixels > 0 && maxPixels > 0) {
458458
if (minPixels == maxPixels) {
459459
messages += '''$this->__f('Note: the amount of pixels must be exactly equal to %amount% pixels.', ['%amount%' => «minPixels»])'''
@@ -587,7 +587,7 @@ class SharedFormTypeFields {
587587
'scale' => «scale»
588588
'''
589589

590-
def private dispatch formType(StringField it) '''«IF role == StringRole.COLOUR»«IF application.targets('2.0-dev')»Color«ELSE»Colour«ENDIF»«ELSEIF role == StringRole.COUNTRY»Country«ELSEIF role == StringRole.CURRENCY»Currency«ELSEIF role == StringRole.LANGUAGE»Language«ELSEIF role == StringRole.LOCALE»Locale«ELSEIF role == StringRole.PASSWORD»Password«ELSEIF role == StringRole.DATE_INTERVAL && application.targets('2.0')»DateInterval«ELSEIF role == StringRole.PHONE_NUMBER»Tel«ELSEIF role == StringRole.TIME_ZONE»Timezone«ELSE»Text«ENDIF»'''
590+
def private dispatch formType(StringField it) '''«IF role == StringRole.COLOUR»«IF application.targets('2.0')»Color«ELSE»Colour«ENDIF»«ELSEIF role == StringRole.COUNTRY»Country«ELSEIF role == StringRole.CURRENCY»Currency«ELSEIF role == StringRole.LANGUAGE»Language«ELSEIF role == StringRole.LOCALE»Locale«ELSEIF role == StringRole.PASSWORD»Password«ELSEIF role == StringRole.DATE_INTERVAL && application.targets('2.0')»DateInterval«ELSEIF role == StringRole.PHONE_NUMBER»Tel«ELSEIF role == StringRole.TIME_ZONE»Timezone«ELSE»Text«ENDIF»'''
591591
def private dispatch titleAttribute(StringField it) '''«IF role == StringRole.COLOUR || role == StringRole.COUNTRY || role == StringRole.CURRENCY || (role == StringRole.DATE_INTERVAL && application.targets('2.0')) || role == StringRole.LANGUAGE || role == StringRole.LOCALE || role == StringRole.TIME_ZONE»Choose the «name.formatForDisplay»«ELSE»Enter the «name.formatForDisplay»«ENDIF»«IF null !== entity» of the «entity.name.formatForDisplay»«ENDIF»'''
592592
def private dispatch additionalAttributes(StringField it) '''
593593
'maxlength' => «length»,

bundles/org.zikula.modulestudio.generator/src/org/zikula/modulestudio/generator/cartridges/zclassic/controller/formtype/field/ColourType.xtend

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class ColourType {
1616
FileHelper fh = new FileHelper
1717

1818
def generate(Application it, IFileSystemAccess fsa) {
19-
if (targets('2.0-dev')) {
19+
if (targets('2.0')) {
2020
return
2121
}
2222
generateClassPair(fsa, 'Form/Type/Field/ColourType.php',

bundles/org.zikula.modulestudio.generator/src/org/zikula/modulestudio/generator/cartridges/zclassic/controller/formtype/field/TelType.xtend

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class TelType {
1616
FileHelper fh = new FileHelper
1717

1818
def generate(Application it, IFileSystemAccess fsa) {
19-
if (targets('2.0-dev')) {
19+
if (targets('2.0')) {
2020
return
2121
}
2222
generateClassPair(fsa, 'Form/Type/Field/TelType.php',

bundles/org.zikula.modulestudio.generator/src/org/zikula/modulestudio/generator/cartridges/zclassic/controller/helper/ControllerHelper.xtend

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ class ControllerHelper {
500500
$url = 'javascript:void(0);';
501501
$subscriberUrl = $assignment->getSubscriberUrl();
502502
if (null !== $subscriberUrl && !empty($subscriberUrl)) {
503-
«IF targets('2.0') || targets('2.0-dev')»
503+
«IF targets('2.0'
504504
$url = $this->router->generate($subscriberUrl['route'], $subscriberUrl['args']);
505505
«ELSE»
506506
if (!isset($subscriberUrl['route'])) {

0 commit comments

Comments
 (0)