Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | protected function addMethods(PhpClass $class, ActionSchema $action) { |
||
13 | $modelName = $this->modelService->getModelNameByAction($action); |
||
14 | $model = $this->modelService->getModel($modelName); |
||
15 | |||
16 | // method: configureParams(OptionsResolver $resolver) |
||
17 | $this->addConfigureParamsMethod($class, $this->twig->render('paginate-configureParams.twig')); |
||
18 | |||
19 | // method: run(Request $request) |
||
20 | $class->addUseStatement('keeko\\framework\\utils\\Parameters'); |
||
21 | $class->addUseStatement(str_replace('model', 'domain', $model->getNamespace()) . '\\' . $model->getPhpName() . 'Domain'); |
||
22 | $class->setMethod($this->generateRunMethod($this->twig->render('paginate-run.twig', [ |
||
23 | 'domain' => $model->getPhpName() . 'Domain' |
||
24 | ]))); |
||
25 | |||
26 | } |
||
27 | |||
29 |