PHPackages                             dbp/relay-base-course-connector-campusonline-bundle - 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. [Database &amp; ORM](/categories/database)
4. /
5. dbp/relay-base-course-connector-campusonline-bundle

ActiveSymfony-bundle[Database &amp; ORM](/categories/database)

dbp/relay-base-course-connector-campusonline-bundle
===================================================

v0.2.12(2w ago)013.2k[1 issues](https://github.com/digital-blueprint/relay-base-course-connector-campusonline-bundle/issues)[1 PRs](https://github.com/digital-blueprint/relay-base-course-connector-campusonline-bundle/pulls)AGPL-3.0-or-laterPHPPHP &gt;=8.2CI passing

Since May 4Pushed 2w ago2 watchersCompare

[ Source](https://github.com/digital-blueprint/relay-base-course-connector-campusonline-bundle)[ Packagist](https://packagist.org/packages/dbp/relay-base-course-connector-campusonline-bundle)[ RSS](/packages/dbp-relay-base-course-connector-campusonline-bundle/feed)WikiDiscussions main Synced 3d ago

READMEChangelogDependencies (120)Versions (47)Used By (0)

DbpRelayBaseCourseConnectorCampusonlineBundle
=============================================

[](#dbprelaybasecourseconnectorcampusonlinebundle)

[GitHub](https://github.com/digital-blueprint/relay-base-course-connector-campusonline-bundle) | [Packagist](https://packagist.org/packages/dbp/relay-base-course-connector-campusonline-bundle)

[![Test](https://github.com/digital-blueprint/relay-base-course-connector-campusonline-bundle/actions/workflows/test.yml/badge.svg)](https://github.com/digital-blueprint/relay-base-course-connector-campusonline-bundle/actions/workflows/test.yml)

Base Symfony bundle for CampusOnline Course integration for the DBP Relay API Server

Integration into the Relay API Server
-------------------------------------

[](#integration-into-the-relay-api-server)

- Add the bundle package as a dependency:

```
composer require dbp/relay-base-course-connector-campusonline-bundle
```

- Add the bundle to your `config/bundles.php`:

```
...
Dbp\Relay\BasePersonBundle\DbpRelayBaseCourseBundle::class => ['all' => true],
Dbp\Relay\BasePersonBundle\DbpRelayBaseCourseConnectorCampusonlineBundle::class => ['all' => true],
...
```

- Run `composer install` to clear caches

Configuration
-------------

[](#configuration)

The bundle has some configuration values that you can specify in your app, either by hard-coding it, or by referencing an environment variable.

For this create `config/packages/dbp_relay_base_course_connector_ldap.yaml` in the app with the following content:

```
dbp_relay_base_course_connector_campusonline:
  campus_online:
    api_token: '%env(CAMPUS_ONLINE_API_TOKEN)%'
    api_url: '%env(CAMPUS_ONLINE_API_URL)%'
    org_root_id: '%env(ORGANIZATION_ROOT_ID)%'
```

For more info on bundle configuration see

Events
------

[](#events)

### CoursePostEvent

[](#coursepostevent)

This event allows you to add additional attributes ("local data") to the `\Dbp\Relay\BaseCourseBundle\Entity\Course` base-entity that you want to be included in responses to `Course` entity requests. Event subscribers receive a `\Dbp\Relay\RelayBaseCourseConnectorCampusonlineBundle\Event\CourseProviderPostEvent` instance containing the `Course` base-entity and the course data provided by Campusonline.

For example, create an event subscriber `src/EventSubscriber/CourseEventSubscriber.php`:

```
