| @@ 195-211 (lines=17) @@ | ||
| 192 | /** | |
| 193 | * @inheritDoc | |
| 194 | */ | |
| 195 | public function getSettingsByCollection($collectionName) | |
| 196 |     { | |
| 197 |         $connection = $this->container->get('connection'); | |
| 198 |         $acl = $this->container->get('acl'); | |
| 199 | $tableGateway = new DirectusSettingsTableGateway($connection, $acl); | |
| 200 | ||
| 201 | $data = [ | |
| 202 | 'meta' => [ | |
| 203 | 'table' => 'directus_settings', | |
| 204 | 'type' => 'entry', | |
| 205 | 'settings_collection' => $collectionName | |
| 206 | ], | |
| 207 | 'data' => $tableGateway->fetchCollection($collectionName) | |
| 208 | ]; | |
| 209 | ||
| 210 | return $this->createResponseFromData($data); | |
| 211 | } | |
| 212 | ||
| 213 | /** | |
| 214 | * @inheritdoc | |
| @@ 524-539 (lines=16) @@ | ||
| 521 | return $this->createMessage($data); | |
| 522 | } | |
| 523 | ||
| 524 | public function createPrivileges(array $data) | |
| 525 |     { | |
| 526 |         $connection = $this->container->get('connection'); | |
| 527 |         $acl = $this->container->get('acl'); | |
| 528 | $privileges = new DirectusPrivilegesTableGateway($connection, $acl); | |
| 529 | ||
| 530 | $response = [ | |
| 531 | 'meta' => [ | |
| 532 | 'type' => 'item', | |
| 533 | 'table' => 'directus_privileges' | |
| 534 | ], | |
| 535 | 'data' => $privileges->insertPrivilege($data) | |
| 536 | ]; | |
| 537 | ||
| 538 | return $this->createResponseFromData($response); | |
| 539 | } | |
| 540 | ||
| 541 | public function createTable($name, array $data = []) | |
| 542 |     { | |
| @@ 624-639 (lines=16) @@ | ||
| 621 | return $this->createResponseFromData($response); | |
| 622 | } | |
| 623 | ||
| 624 | public function getPreferences($table, $user) | |
| 625 |     { | |
| 626 |         $acl = $this->container->get('acl'); | |
| 627 |         $connection = $this->container->get('connection'); | |
| 628 | $preferencesTableGateway = new DirectusPreferencesTableGateway($connection, $acl); | |
| 629 | ||
| 630 | $response = [ | |
| 631 | 'meta' => [ | |
| 632 | 'type' => 'item', | |
| 633 | 'table' => 'directus_preferences' | |
| 634 | ], | |
| 635 | 'data' => $preferencesTableGateway->fetchByUserAndTableAndTitle($user, $table) | |
| 636 | ]; | |
| 637 | ||
| 638 | return $this->createResponseFromData($response); | |
| 639 | } | |
| 640 | ||
| 641 | /** | |
| 642 | * @inheritdoc | |