Skip to content

Commit df21675

Browse files
committed
bugfix for list handling
1 parent 5ad450e commit df21675

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

  • bundles/org.zikula.modulestudio.generator/src/org/zikula/modulestudio/generator/cartridges/symfony/controller/action

bundles/org.zikula.modulestudio.generator/src/org/zikula/modulestudio/generator/cartridges/symfony/controller/action/AbstractAction.xtend

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,17 +129,21 @@ abstract class AbstractAction implements ActionInterface {
129129
public function «formattedName»(«invocationArguments(false).join(', ')»): Response
130130
{
131131
«entity.controllerPreprocessing»
132-
return ($this->«formattedName»Action)(«invocationArguments(true).map[a|a.split(' ').last].join(', ')»);
132+
return ($this->«formattedName»Action)(«invocationArgumentsInCall»);
133133
}
134134
'''
135135
136+
def private invocationArgumentsInCall(Application it) {
137+
invocationArguments(true).map[a|a.split(' ').toList.last].join(', ')
138+
}
139+
136140
def protected route(Application it, Entity entity) '''
137141
#[AdminRoute(path: '/«formattedName»', name: '«name().formatForDB»', options: «entity.routeMethodAndOptions»)]
138142
'''
139143
140144
def protected controllerAttributes(Application it, Entity entity) {}
141145
142-
def protected routeMethodAndOptions(Entity it) '''['methods' => «routeMethods»«IF !routeOptions.empty», «routeOptions»«ENDIF»]'''
146+
def protected routeMethodAndOptions(Entity it) '''['methods' => «routeMethods»«IF 0 < routeOptions.length», «routeOptions»«ENDIF»]'''
143147
144148
def protected routeMethods(Entity it) ''''''
145149

0 commit comments

Comments
 (0)