| @@ 57-72 (lines=16) @@ | ||
| 54 | return (int)$this->connection->lastInsertId(Gateway::CONTENT_SECTION_SEQ); |
|
| 55 | } |
|
| 56 | ||
| 57 | public function updateSection(int $id, string $name, string $identifier): void |
|
| 58 | { |
|
| 59 | $query = $this->connection->createQueryBuilder(); |
|
| 60 | $query |
|
| 61 | ->update(self::CONTENT_SECTION_TABLE) |
|
| 62 | ->set('name', $query->createPositionalParameter($name)) |
|
| 63 | ->set('identifier', $query->createPositionalParameter($identifier)) |
|
| 64 | ->where( |
|
| 65 | $query->expr()->eq( |
|
| 66 | 'id', |
|
| 67 | $query->createPositionalParameter($id, ParameterType::INTEGER) |
|
| 68 | ) |
|
| 69 | ); |
|
| 70 | ||
| 71 | $query->execute(); |
|
| 72 | } |
|
| 73 | ||
| 74 | public function loadSectionData(int $id): array |
|
| 75 | { |
|
| @@ 201-220 (lines=20) @@ | ||
| 198 | } |
|
| 199 | } |
|
| 200 | ||
| 201 | public function removeRole(int $contentId, int $roleId): void |
|
| 202 | { |
|
| 203 | $query = $this->connection->createQueryBuilder(); |
|
| 204 | $expr = $query->expr(); |
|
| 205 | $query |
|
| 206 | ->delete('ezuser_role') |
|
| 207 | ->where( |
|
| 208 | $expr->eq( |
|
| 209 | 'contentobject_id', |
|
| 210 | $query->createPositionalParameter($contentId, ParameterType::INTEGER) |
|
| 211 | ) |
|
| 212 | ) |
|
| 213 | ->andWhere( |
|
| 214 | $expr->eq( |
|
| 215 | 'role_id', |
|
| 216 | $query->createPositionalParameter($roleId, ParameterType::INTEGER) |
|
| 217 | ) |
|
| 218 | ); |
|
| 219 | $query->execute(); |
|
| 220 | } |
|
| 221 | ||
| 222 | public function removeRoleAssignmentById(int $roleAssignmentId): void |
|
| 223 | { |
|