| @@ 45-53 (lines=9) @@ | ||
| 42 | /** |
|
| 43 | * {@inheritdoc} |
|
| 44 | */ |
|
| 45 | public function recover($trashedId, $newParentId) |
|
| 46 | { |
|
| 47 | $this->logger->logCall(__METHOD__, array('id' => $trashedId, 'newParentId' => $newParentId)); |
|
| 48 | $return = $this->persistenceHandler->trashHandler()->recover($trashedId, $newParentId); |
|
| 49 | ||
| 50 | $this->cache->invalidateTags(['location-' . $trashedId, 'location-path-' . $trashedId]); |
|
| 51 | ||
| 52 | return $return; |
|
| 53 | } |
|
| 54 | ||
| 55 | /** |
|
| 56 | * {@inheritdoc} |
|
| @@ 233-249 (lines=17) @@ | ||
| 230 | /** |
|
| 231 | * {@inheritdoc} |
|
| 232 | */ |
|
| 233 | public function locationMoved($locationId, $oldParentId, $newParentId) |
|
| 234 | { |
|
| 235 | $this->logger->logCall( |
|
| 236 | __METHOD__, |
|
| 237 | array( |
|
| 238 | 'location' => $locationId, |
|
| 239 | 'oldParent' => $oldParentId, |
|
| 240 | 'newParent' => $newParentId, |
|
| 241 | ) |
|
| 242 | ); |
|
| 243 | ||
| 244 | $return = $this->persistenceHandler->urlAliasHandler()->locationMoved($locationId, $oldParentId, $newParentId); |
|
| 245 | ||
| 246 | $this->cache->invalidateTags(['urlAlias-location-' . $locationId, 'urlAlias-location-path-' . $locationId]); |
|
| 247 | ||
| 248 | return $return; |
|
| 249 | } |
|
| 250 | ||
| 251 | /** |
|
| 252 | * {@inheritdoc} |
|
| @@ 254-273 (lines=20) @@ | ||
| 251 | /** |
|
| 252 | * {@inheritdoc} |
|
| 253 | */ |
|
| 254 | public function locationCopied($locationId, $newLocationId, $newParentId) |
|
| 255 | { |
|
| 256 | $this->logger->logCall( |
|
| 257 | __METHOD__, |
|
| 258 | array( |
|
| 259 | 'oldLocation' => $locationId, |
|
| 260 | 'newLocation' => $newLocationId, |
|
| 261 | 'newParent' => $newParentId, |
|
| 262 | ) |
|
| 263 | ); |
|
| 264 | ||
| 265 | $return = $this->persistenceHandler->urlAliasHandler()->locationCopied( |
|
| 266 | $locationId, |
|
| 267 | $newLocationId, |
|
| 268 | $newParentId |
|
| 269 | ); |
|
| 270 | $this->cache->invalidateTags(['urlAlias-location-' . $locationId, 'urlAlias-location-' . $newLocationId]); |
|
| 271 | ||
| 272 | return $return; |
|
| 273 | } |
|
| 274 | ||
| 275 | /** |
|
| 276 | * {@inheritdoc} |
|
| @@ 346-364 (lines=19) @@ | ||
| 343 | /** |
|
| 344 | * {@inheritdoc} |
|
| 345 | */ |
|
| 346 | public function archiveUrlAliasesForDeletedTranslations($locationId, $parentLocationId, array $languageCodes) |
|
| 347 | { |
|
| 348 | $this->logger->logCall( |
|
| 349 | __METHOD__, |
|
| 350 | [ |
|
| 351 | 'locationId' => $locationId, |
|
| 352 | 'parentLocationId' => $parentLocationId, |
|
| 353 | 'languageCodes' => implode(',', $languageCodes), |
|
| 354 | ] |
|
| 355 | ); |
|
| 356 | ||
| 357 | $this->persistenceHandler->urlAliasHandler()->archiveUrlAliasesForDeletedTranslations( |
|
| 358 | $locationId, |
|
| 359 | $parentLocationId, |
|
| 360 | $languageCodes |
|
| 361 | ); |
|
| 362 | ||
| 363 | $this->cache->invalidateTags(['urlAlias-location-' . $locationId, 'urlAlias-location-path-' . $locationId]); |
|
| 364 | } |
|
| 365 | ||
| 366 | /** |
|
| 367 | * Return relevant UrlAlias and optionally UrlAlias location tags so cache can be purged reliably. |
|
| @@ 456-464 (lines=9) @@ | ||
| 453 | /** |
|
| 454 | * {@inheritdoc} |
|
| 455 | */ |
|
| 456 | public function assignRole($contentId, $roleId, array $limitation = null) |
|
| 457 | { |
|
| 458 | $this->logger->logCall(__METHOD__, array('group' => $contentId, 'role' => $roleId, 'limitation' => $limitation)); |
|
| 459 | $return = $this->persistenceHandler->userHandler()->assignRole($contentId, $roleId, $limitation); |
|
| 460 | ||
| 461 | $this->cache->invalidateTags(['role-assignment-group-list-' . $contentId, 'role-assignment-role-list-' . $roleId]); |
|
| 462 | ||
| 463 | return $return; |
|
| 464 | } |
|
| 465 | ||
| 466 | /** |
|
| 467 | * {@inheritdoc} |
|
| @@ 469-477 (lines=9) @@ | ||
| 466 | /** |
|
| 467 | * {@inheritdoc} |
|
| 468 | */ |
|
| 469 | public function unassignRole($contentId, $roleId) |
|
| 470 | { |
|
| 471 | $this->logger->logCall(__METHOD__, array('group' => $contentId, 'role' => $roleId)); |
|
| 472 | $return = $this->persistenceHandler->userHandler()->unassignRole($contentId, $roleId); |
|
| 473 | ||
| 474 | $this->cache->invalidateTags(['role-assignment-group-list-' . $contentId, 'role-assignment-role-list-' . $roleId]); |
|
| 475 | ||
| 476 | return $return; |
|
| 477 | } |
|
| 478 | ||
| 479 | /** |
|
| 480 | * {@inheritdoc} |
|