| @@ 402-409 (lines=8) @@ | ||
| 399 | /** |
|
| 400 | * {@inheritdoc} |
|
| 401 | */ |
|
| 402 | public function publish($typeId) |
|
| 403 | { |
|
| 404 | $this->logger->logCall(__METHOD__, array('type' => $typeId)); |
|
| 405 | $this->persistenceHandler->contentTypeHandler()->publish($typeId); |
|
| 406 | ||
| 407 | // Clear type cache, map cache, and content cache which contains fields. |
|
| 408 | $this->cache->invalidateTags(['type-'.$typeId, 'type-map', 'content-fields-type-'.$typeId]); |
|
| 409 | } |
|
| 410 | ||
| 411 | /** |
|
| 412 | * {@inheritdoc} |
|
| @@ 205-211 (lines=7) @@ | ||
| 202 | /** |
|
| 203 | * {@inheritdoc} |
|
| 204 | */ |
|
| 205 | public function update(UpdateStruct $struct, $locationId) |
|
| 206 | { |
|
| 207 | $this->logger->logCall(__METHOD__, array('location' => $locationId, 'struct' => $struct)); |
|
| 208 | $this->persistenceHandler->locationHandler()->update($struct, $locationId); |
|
| 209 | ||
| 210 | $this->cache->invalidateTags(['location-'.$locationId]); |
|
| 211 | } |
|
| 212 | ||
| 213 | /** |
|
| 214 | * {@inheritdoc} |
|
| @@ 250-256 (lines=7) @@ | ||
| 247 | /** |
|
| 248 | * {@inheritdoc} |
|
| 249 | */ |
|
| 250 | public function setSectionForSubtree($locationId, $sectionId) |
|
| 251 | { |
|
| 252 | $this->logger->logCall(__METHOD__, array('location' => $locationId, 'section' => $sectionId)); |
|
| 253 | $this->persistenceHandler->locationHandler()->setSectionForSubtree($locationId, $sectionId); |
|
| 254 | ||
| 255 | $this->cache->invalidateTags(['location-path-'.$locationId]); |
|
| 256 | } |
|
| 257 | ||
| 258 | /** |
|
| 259 | * {@inheritdoc} |
|
| @@ 261-267 (lines=7) @@ | ||
| 258 | /** |
|
| 259 | * {@inheritdoc} |
|
| 260 | */ |
|
| 261 | public function changeMainLocation($contentId, $locationId) |
|
| 262 | { |
|
| 263 | $this->logger->logCall(__METHOD__, array('location' => $locationId, 'content' => $contentId)); |
|
| 264 | $this->persistenceHandler->locationHandler()->changeMainLocation($contentId, $locationId); |
|
| 265 | ||
| 266 | $this->cache->invalidateTags(['content-'.$contentId]); |
|
| 267 | } |
|
| 268 | ||
| 269 | /** |
|
| 270 | * Return relevant content and location tags so cache can be purged reliably. |
|
| @@ 128-136 (lines=9) @@ | ||
| 125 | /** |
|
| 126 | * @see \eZ\Publish\SPI\Persistence\Content\ObjectState\Handler::updateGroup |
|
| 127 | */ |
|
| 128 | public function updateGroup($groupId, InputStruct $input) |
|
| 129 | { |
|
| 130 | $this->logger->logCall(__METHOD__, array('groupId' => $groupId, 'struct' => $input)); |
|
| 131 | $return = $this->persistenceHandler->objectStateHandler()->updateGroup($groupId, $input); |
|
| 132 | ||
| 133 | $this->cache->invalidateTags(['state-group-'.$groupId]); |
|
| 134 | ||
| 135 | return $return; |
|
| 136 | } |
|
| 137 | ||
| 138 | /** |
|
| 139 | * @see \eZ\Publish\SPI\Persistence\Content\ObjectState\Handler::deleteGroup |
|
| @@ 125-133 (lines=9) @@ | ||
| 122 | /** |
|
| 123 | * @see eZ\Publish\SPI\Persistence\Content\Section\Handler |
|
| 124 | */ |
|
| 125 | public function assign($sectionId, $contentId) |
|
| 126 | { |
|
| 127 | $this->logger->logCall(__METHOD__, array('section' => $sectionId, 'content' => $contentId)); |
|
| 128 | $return = $this->persistenceHandler->sectionHandler()->assign($sectionId, $contentId); |
|
| 129 | ||
| 130 | $this->cache->invalidateTags(['content-'.$contentId]); |
|
| 131 | ||
| 132 | return $return; |
|
| 133 | } |
|
| 134 | ||
| 135 | /** |
|
| 136 | * Number of content assignments a Section has. |
|
| @@ 106-115 (lines=10) @@ | ||
| 103 | /** |
|
| 104 | * @see eZ\Publish\SPI\Persistence\User\Handler::update |
|
| 105 | */ |
|
| 106 | public function update(User $user) |
|
| 107 | { |
|
| 108 | $this->logger->logCall(__METHOD__, array('struct' => $user)); |
|
| 109 | $return = $this->persistenceHandler->userHandler()->update($user); |
|
| 110 | ||
| 111 | // Clear corresponding content cache as update of the User changes it's external data |
|
| 112 | $this->cache->invalidateTags(['content-fields-'.$user->id, 'user-'.$user->id]); |
|
| 113 | ||
| 114 | return $return; |
|
| 115 | } |
|
| 116 | ||
| 117 | /** |
|
| 118 | * @see eZ\Publish\SPI\Persistence\User\Handler::delete |
|
| @@ 309-315 (lines=7) @@ | ||
| 306 | /** |
|
| 307 | * @see eZ\Publish\SPI\Persistence\User\Handler::updateRole |
|
| 308 | */ |
|
| 309 | public function updateRole(RoleUpdateStruct $struct) |
|
| 310 | { |
|
| 311 | $this->logger->logCall(__METHOD__, array('struct' => $struct)); |
|
| 312 | $this->persistenceHandler->userHandler()->updateRole($struct); |
|
| 313 | ||
| 314 | $this->cache->invalidateTags(['role-'.$struct->id]); |
|
| 315 | } |
|
| 316 | ||
| 317 | /** |
|
| 318 | * @see eZ\Publish\SPI\Persistence\User\Handler::deleteRole |
|
| @@ 376-384 (lines=9) @@ | ||
| 373 | /** |
|
| 374 | * @see eZ\Publish\SPI\Persistence\User\Handler::updatePolicy |
|
| 375 | */ |
|
| 376 | public function updatePolicy(Policy $policy) |
|
| 377 | { |
|
| 378 | $this->logger->logCall(__METHOD__, array('struct' => $policy)); |
|
| 379 | $return = $this->persistenceHandler->userHandler()->updatePolicy($policy); |
|
| 380 | ||
| 381 | $this->cache->invalidateTags(['policy-'.$policy->id, 'role-'.$policy->roleId]); |
|
| 382 | ||
| 383 | return $return; |
|
| 384 | } |
|
| 385 | ||
| 386 | /** |
|
| 387 | * @see eZ\Publish\SPI\Persistence\User\Handler::deletePolicy |
|
| @@ 389-395 (lines=7) @@ | ||
| 386 | /** |
|
| 387 | * @see eZ\Publish\SPI\Persistence\User\Handler::deletePolicy |
|
| 388 | */ |
|
| 389 | public function deletePolicy($policyId) |
|
| 390 | { |
|
| 391 | $this->logger->logCall(__METHOD__, array('policy' => $policyId)); |
|
| 392 | $this->persistenceHandler->userHandler()->deletePolicy($policyId); |
|
| 393 | ||
| 394 | $this->cache->invalidateTags(['policy-'.$policyId]); |
|
| 395 | } |
|
| 396 | ||
| 397 | /** |
|
| 398 | * @see eZ\Publish\SPI\Persistence\User\Handler::loadPoliciesByUserId |
|
| @@ 438-446 (lines=9) @@ | ||
| 435 | /** |
|
| 436 | * @see eZ\Publish\SPI\Persistence\User\Handler::removeRoleAssignment |
|
| 437 | */ |
|
| 438 | public function removeRoleAssignment($roleAssignmentId) |
|
| 439 | { |
|
| 440 | $this->logger->logCall(__METHOD__, array('assignment' => $roleAssignmentId)); |
|
| 441 | $return = $this->persistenceHandler->userHandler()->removeRoleAssignment($roleAssignmentId); |
|
| 442 | ||
| 443 | $this->cache->invalidateTags(['role-assignment-'.$roleAssignmentId]); |
|
| 444 | ||
| 445 | return $return; |
|
| 446 | } |
|
| 447 | } |
|
| 448 | ||