|
@@ 151-153 (lines=3) @@
|
| 148 |
|
*/ |
| 149 |
|
public function updateSection(Section $section, SectionUpdateStruct $sectionUpdateStruct) |
| 150 |
|
{ |
| 151 |
|
if ($sectionUpdateStruct->name !== null && !is_string($sectionUpdateStruct->name)) { |
| 152 |
|
throw new InvalidArgumentValue('name', $section->name, 'Section'); |
| 153 |
|
} |
| 154 |
|
|
| 155 |
|
if ($sectionUpdateStruct->identifier !== null && !is_string($sectionUpdateStruct->identifier)) { |
| 156 |
|
throw new InvalidArgumentValue('identifier', $section->identifier, 'Section'); |
|
@@ 155-157 (lines=3) @@
|
| 152 |
|
throw new InvalidArgumentValue('name', $section->name, 'Section'); |
| 153 |
|
} |
| 154 |
|
|
| 155 |
|
if ($sectionUpdateStruct->identifier !== null && !is_string($sectionUpdateStruct->identifier)) { |
| 156 |
|
throw new InvalidArgumentValue('identifier', $section->identifier, 'Section'); |
| 157 |
|
} |
| 158 |
|
|
| 159 |
|
if (!$this->permissionResolver->canUser('section', 'edit', $section)) { |
| 160 |
|
throw new UnauthorizedException('section', 'edit'); |