We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 27 | public function crudFromController(string $controller): CrudPanel |
||
| 28 | { |
||
| 29 | $controller = new $controller(); |
||
| 30 | |||
| 31 | $crud = $this->crud($controller); |
||
| 32 | |||
| 33 | // TODO: it's hardcoded, but we should figure out a way to make it dynamic if needed. |
||
| 34 | $crud->setOperation('list'); |
||
| 35 | |||
| 36 | $primaryControllerRequest = $this->cruds[array_key_first($this->cruds)]->getRequest(); |
||
| 37 | |||
| 38 | $controller->initializeCrud($primaryControllerRequest, 'list'); |
||
| 39 | |||
| 40 | return $this->cruds[get_class($controller)]; |
||
| 41 | } |
||
| 53 |