Skip to content
Snippets Groups Projects

Handle publication status of entities that have a published flag.

Merged Ilias Dimopoulos requested to merge issue/rdf_sync-3478179:3478179-allow-to-check into 1.x
4 unresolved threads

Handle publication status of viable entities.

Closes #3478179

Merge request reports

Approval is optional

Merged by Claudiu CristeaClaudiu Cristea 6 months ago (Oct 3, 2024 1:29pm UTC)

Merge details

  • Changes merged into 11.x with f7af5eb3 (commits were squashed).
  • Did not delete the source branch.

Pipeline #299931 passed with warnings

Pipeline passed with warnings for f7af5eb3 on 1.x

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • 11 /**
    12 * Occurs before syncing the entities to the endpoint.
    13 *
    14 * Subscribers are able to alter the list of entities to be synced or perform
    15 * additional actions.
    16 */
    17 class RdfSyncEvent extends Event {
    18
    19 /**
    20 * Constructs a new event class instance.
    21 *
    22 * @param \Drupal\rdf_sync\Model\SyncMethod $syncMethod
    23 * The sync method.
    24 * @param ContentEntityInterface[] $entities
    25 * The objects to be synced.
    26 */
  • 26 * Filters out unpublished entities.
    27 *
    28 * @param \Drupal\rdf_sync\Event\RdfSyncEvent $event
    29 * The event object.
    30 */
    31 public function filterOutUnpublished(RdfSyncEvent $event): void {
    32 $entities = $event->getEntities();
    33 $entities = array_filter($entities, function ($entity): bool {
    34 // Do not filter out entities that do not implement
    35 // EntityPublishedInterface as we cannot determine their publication
    36 // status and might filter out entities that should be synced.
    37 if (!$entity instanceof EntityPublishedInterface) {
    38 return TRUE;
    39 }
    40
    41 return $entity->isPublished();
  • 1 services:
    2 rdf_sync_published.sync.subscriber:
    3 class: Drupal\rdf_sync_published\EventSubscriber\RdfSyncPublishedSubscriber
    4 tags:
    5 - { name: event_subscriber }
  • added 5 commits

    • 60d68ce3 - Rename the info file.
    • f5a40924 - Optimize code. Fix codesniffs.
    • 4a97d406 - Use a shorter version of the check.
    • 73435987 - Remove constructor phpdoc.
    • 0a0443e1 - Remove tags, remove parenthesis.

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 4 commits

    • b261ec43 - The tags are still needed.
    • 9cbf77ab - Add necessary dependencies for the test.
    • 2cb4327a - Remove unused variable.
    • 6f22d997 - Fix the test to also check for missing triples.

    Compare with previous version

  • added 1 commit

    • 4bbe7484 - Ensure state cache is cleared when the state is updated in Drush.

    Compare with previous version

  • added 3 commits

    • d5c94d7d - 1 commit from branch project:1.x
    • df9c8e5a - Merge remote-tracking branch 'origin/1.x' into 3478179-allow-to-check
    • e22093b5 - Revert removal of URI assignment.

    Compare with previous version

  • added 1 commit

    • 6376a262 - Simplify the expression with a XOR.

    Compare with previous version

  • Claudiu Cristea approved this merge request

    approved this merge request

  • Please register or sign in to reply
    Loading