PHPackages                             ynorth-projects/openy\_pef\_gxp\_sync - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ynorth-projects/openy\_pef\_gxp\_sync

ActiveDrupal-module[Utility &amp; Helpers](/categories/utility)

ynorth-projects/openy\_pef\_gxp\_sync
=====================================

Synchronizes Groupex schedules to PEF.

1.1.6(2y ago)071.8k↓44.1%21GPL-2.0+PHP

Since Feb 22Pushed 2y ago5 watchersCompare

[ Source](https://github.com/ynorth-projects/openy_pef_gxp_sync)[ Packagist](https://packagist.org/packages/ynorth-projects/openy_pef_gxp_sync)[ RSS](/packages/ynorth-projects-openy-pef-gxp-sync/feed)WikiDiscussions production Synced 1mo ago

READMEChangelog (8)Dependencies (2)Versions (15)Used By (1)

OpenY PEF GXP Sync
------------------

[](#openy-pef-gxp-sync)

Synchronizes GroupEx schedules to PEF.

### Quick start

[](#quick-start)

#### Enable the modules

[](#enable-the-modules)

1. Log in as an Admin
2. Go to Extend (`/admin/modules`)
3. Install `OpenY PEF GXP Sync` and `Open Y Mappings Feature` then enable all dependencies as requested on the next step.

#### Configure the OpenY GXP module

[](#configure-the-openy-gxp-module)

1. Go to: Open Y -&gt; Integrations -&gt; GroupEx Pro -&gt; GroupEx Pro settings (`/admin/openy/integrations/groupex-pro/gxp`).
2. Set up your GroupExPro Client Id (which you can obtain from GroupEx PRO support).
3. Provide the parent activity ID. It should be listed in Group Exercises, under Fitness.
4. Enter Activity `Group Exercise Classes` (choose node of type Activity from autocomplete). Most likely the ID will be 94 if this is a default demo content).
5. Enter Locations Mapping in the following format:

    ```
    202,West YMCA
    204,Downtown YMCA
    203,East YMCA
    3718,South YMCA

    ```
6. Save the configuration.
7. Go to: Configuration -&gt; System -&gt; YMCA Sync settings (`/admin/config/system/ymca-sync`)
8. Enable the checkbox labeled `openy_pef_gxp_sync` and Save. The `openy_pef_gxp_sync` module should be enabled in your system.
9. Go to: Open Y -&gt; Settings -&gt; Mappings -&gt; Mapping list (`/admin/openy/settings/mappings/mapping`)
10. Add mappings for every branch you would like to synchronize:

    - Enter the name of the mapping to easily identify it in the future. For instance, `West YMCA GXP sync mapping`.
    - Authored by - Keep as is
    - Locations - Choose Branch
    - GroupEx ID - Enter the GroupEx ID of the Branch
    - Save
11. Go to: `admin/openy/settings/groupex-enabled-locations` and enable Locations that you want to sync.
12. Run the Drush command to sync from your project docroot:

    - `drush openy-pef-gxp-sync` (Drupal 8, Drush 8)
    - `drush yn-sync openy_pef_gxp_sync.syncer` (Drupal 9, Drush 10)

#### How to sync my GroupEx data to my project?

[](#how-to-sync-my-groupex-data-to-my-project)

See the final step above for the proper Drush commands.

### How the syncer works

[](#how-the-syncer-works)

The syncer consists of the next steps:

1. Fetcher - fetches data from GroupEx API.
2. Wrapper - processes the data for saving (maps location ids, fixes title encoding problems, etc).
3. Wrapper - groups all items by Class ID and Location ID, calculates hashes.
4. Wrapper - prepares data to be removed (extra items in DB or changed hashes)
5. Wrapper - prepares data to be created (new items + changed hashes)
6. Cleaner - removes data to be removed.
7. Saver - creates data to be created.

### How the syncer works (for developers)

[](#how-the-syncer-works-for-developers)

#### Adding &amp; Removing locations

[](#adding--removing-locations)

1. If a location is removed in API it should be removed in DB.
2. If a location is added in API it should be added (with classes) in DB.
3. If a class is removed in API it should be removed in DB (with all class items);
4. If a class is added in API it should be added in DB (with all class items);

#### Updating classes

[](#updating-classes)

1. Each GroupEx class can have several class items (with the same class ID).
2. We compare hashes for Location ID + Class ID + all class items inside (on unprocessed data!).
3. If the hash is changed we should remove all items belonging to this hash and create them again.

### How to debug

[](#how-to-debug)

1. To emulate API data please use `FetcherDebuggerClass`. Just replace `@openy_pef_gxp_sync.fetcher` with `@openy_pef_gxp_sync.fetcher_debugger` to emulate API response.
2. Use `DEBUG_MODE` constants inside classes to debug specific services.

### Known issues in sync.

[](#known-issues-in-sync)

1. There is an issue if a class in a GroupEx has its category set to "General" - it will not be synced and displayed at PEF. This is a limitation of GroupEX PRO API.

### Default Syncer behavior

[](#default-syncer-behavior)

By default, the Syncer creates unpublished Session nodes. In order for them to become visible in the Schedules application, you'd need to set config variables to allow unpublished entities to be displayed

- config `openy_repeat.settings` - variable `allow_unpublished_references: 1` - this is for unpublished Session, Program, Program Subcategory session nodes.
- config `openy_session_instance.settings` - variable `allow_unpublished_references: 1` - this works only for unpublished Session nodes.

Run next commands if you want to switch to `published mode`:

```
 drush cset openy_repeat.settings allow_unpublished_references 1 -y
 drush cset openy_session_instance.settings allow_unpublished_references 1 -y

```

Run next commands if you want to switch to `unpublished mode`:

```
 drush cset openy_repeat.settings allow_unpublished_references 0 -y
 drush cset openy_session_instance.settings allow_unpublished_references 0 -y

```

You need to clear cache in order to get this setting working. At this moment we have no UI for setting these variables, so using `drush cset` or importing configs via Config Manager is recommended.

### Enabled Groupex Locations

[](#enabled-groupex-locations)

Use config `openy_pef_gxp_sync.enabled_locations` to allow locations from GroupEx PRO to be synced.

This config contains an array of location IDs from GroupEx.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~133 days

Recently: every ~239 days

Total

9

Last Release

848d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1388b312dca2d4c24fb3474c71a6729b13b255860ff0188b0286013bc703bf5a?d=identicon)[podarok](/maintainers/podarok)

![](https://www.gravatar.com/avatar/4558114408c700ee4fe122cf32e229c67e2a72a8da55256930a02685612572fa?d=identicon)[Open-Y-Distro](/maintainers/Open-Y-Distro)

---

Top Contributors

[![podarok](https://avatars.githubusercontent.com/u/563412?v=4)](https://github.com/podarok "podarok (28 commits)")[![svicervlad](https://avatars.githubusercontent.com/u/26228931?v=4)](https://github.com/svicervlad "svicervlad (21 commits)")[![shuklina](https://avatars.githubusercontent.com/u/22738130?v=4)](https://github.com/shuklina "shuklina (8 commits)")[![anpolimus](https://avatars.githubusercontent.com/u/3023950?v=4)](https://github.com/anpolimus "anpolimus (6 commits)")[![danylevskyi](https://avatars.githubusercontent.com/u/1369783?v=4)](https://github.com/danylevskyi "danylevskyi (4 commits)")[![mauriciopieper](https://avatars.githubusercontent.com/u/5420916?v=4)](https://github.com/mauriciopieper "mauriciopieper (1 commits)")[![manachynskyi](https://avatars.githubusercontent.com/u/4816431?v=4)](https://github.com/manachynskyi "manachynskyi (1 commits)")[![froboy](https://avatars.githubusercontent.com/u/238201?v=4)](https://github.com/froboy "froboy (1 commits)")

---

Tags

openyopeny-decoupledopeny-gxppefsyncer

### Embed Badge

![Health badge](/badges/ynorth-projects-openy-pef-gxp-sync/health.svg)

```
[![Health](https://phpackages.com/badges/ynorth-projects-openy-pef-gxp-sync/health.svg)](https://phpackages.com/packages/ynorth-projects-openy-pef-gxp-sync)
```

###  Alternatives

[farmos/farmos

A web-based farm record keeping application.

1.2k6.7k1](/packages/farmos-farmos)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
