|
@@ 112-128 (lines=17) @@
|
| 109 |
|
$this->registerRoute($mount, $name, $actionName, $path, $action, ['POST'], ['class' => $class]); |
| 110 |
|
} |
| 111 |
|
|
| 112 |
|
public function registerReadAction($mount, $name, $path, $repository, $class) |
| 113 |
|
{ |
| 114 |
|
$definition = new Definition(ReadController::class); |
| 115 |
|
$definition->setArguments( |
| 116 |
|
[ |
| 117 |
|
$repository, |
| 118 |
|
$this->getEvm(), |
| 119 |
|
] |
| 120 |
|
); |
| 121 |
|
|
| 122 |
|
$actionName = 'read'; |
| 123 |
|
$controllerId = $this->generateControllerId($name, $actionName); |
| 124 |
|
$this->container->setDefinition($controllerId, $definition); |
| 125 |
|
|
| 126 |
|
$action = $controllerId.':'.ReadController::ACTION; |
| 127 |
|
$this->registerRoute($mount, $name, $actionName, $path, $action, ['GET', 'POST'], ['class' => $class]); |
| 128 |
|
} |
| 129 |
|
|
| 130 |
|
public function registerUpdateAction($mount, $name, $path, $repository, $processor, $manager, $class) |
| 131 |
|
{ |
|
@@ 156-173 (lines=18) @@
|
| 153 |
|
$this->registerRoute($mount, $name, $actionName, $path, $action, ['POST'], ['class' => $class]); |
| 154 |
|
} |
| 155 |
|
|
| 156 |
|
public function registerDeleteAction($mount, $name, $path, $repository, $manager, $class) |
| 157 |
|
{ |
| 158 |
|
$definition = new Definition(DeleteController::class); |
| 159 |
|
$definition->setArguments( |
| 160 |
|
[ |
| 161 |
|
$repository, |
| 162 |
|
$manager, |
| 163 |
|
$this->getEvm(), |
| 164 |
|
] |
| 165 |
|
); |
| 166 |
|
|
| 167 |
|
$actionName = 'delete'; |
| 168 |
|
$controllerId = $controllerId = $this->generateControllerId($name, $actionName); |
| 169 |
|
$this->container->setDefinition($controllerId, $definition); |
| 170 |
|
|
| 171 |
|
$action = $controllerId.':'.DeleteController::ACTION; |
| 172 |
|
$this->registerRoute($mount, $name, $actionName, $path, $action, ['POST'], ['class' => $class]); |
| 173 |
|
} |
| 174 |
|
|
| 175 |
|
public function registerSearchAction($mount, $name, $path, $class, $repository, $criteria) |
| 176 |
|
{ |