PHPackages                             reload/os2display-slide-tools - 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. reload/os2display-slide-tools

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

reload/os2display-slide-tools
=============================

Reusable tools for working with slides in https://github.com/os2display

1.0.10(4y ago)0300[2 PRs](https://github.com/reload/os2display-slide-tools/pulls)PHP

Since Jan 18Pushed 4y agoCompare

[ Source](https://github.com/reload/os2display-slide-tools)[ Packagist](https://packagist.org/packages/reload/os2display-slide-tools)[ RSS](/packages/reload-os2display-slide-tools/feed)WikiDiscussions master Synced today

READMEChangelog (7)DependenciesVersions (17)Used By (0)

Os2Display Slide Tools
======================

[](#os2display-slide-tools)

Tools for working with slides for  The tools are meant to help with slides that have "slides within". It is not meant to replace the slide advancer in Os2Display, but it can allow a slide setup once by a person to have as many sub-slides as needed.

The idea is that a slide will have a number of "data items". That could be a list of events for instance. Each event would be a data item. The slide can have any number of subslides that displays a number of data items.

### Config variables

[](#config-variables)

The variables here are the settings available on slides (in the `[slidename].json` file:

Variable name`sis_total_items`How many data items should the slide have.`sis_items_pr_slide`How many data items should be displayed on each subslide.`sis_subslide_duration`How long should each subslide be displayed.`sis_cron_subscriber`Identifier to use if you want your slide type to fetch data on cron.`sis_data_ttl_minutes`How many minutes between data fetches for the slide type. Defaults to 10 minutes.In `config.yml` these settings are available:

```
os2_display_slide_tools:
    use_ttl: true
```

`use_ttl` determines if there should be a wait between fetching data for the slides. It's set to `false` by default.

Creating a new slide type
-------------------------

[](#creating-a-new-slide-type)

In your [custom bundle](https://github.com/os2display/docs/blob/master/guidelines/custom-bundles-guidelines.md), create a new [template](https://github.com/os2display/docs/blob/master/guidelines/template-guidelines.md) following the documentation [here](https://github.com/os2display/docs/blob/master/guidelines/template-guidelines.md).

To take advantage of the tools in this repo you need to do a couple of things in your `.json` file:

- In the `empty_options` part of the config, add the following defaults (with your own values of course).

    ```
      "empty_options": {
        "sis_cron_subscriber": "your_cron_key",
        "sis_subslide_duration": 10,
        "sis_total_items": 9,
        "sis_items_pr_slide": 1,
        "sis_data_ttl_minutes": 5
      }
    ```

- If you want the user to be able to adjust these values, add the tool from this library in the `tools` part:

```
    "tools": [   {
        "name": "Slides in slides",
        "id": "slides-in-slide-config-editor"
      }
    ]
```

The `.js`-file you link to in `paths.js` in the `.json.` file can take advantage of the sub-slide-advancing in this tool.

The Os2Display framework does not have a way to include more than one JS file for each slide, so you will have to use Gulp or whatever your tool of choice is to compile `Resources/public/js/slides-in-slide.js` from this library into your `.js` file for the slide.

You can then use the subslide advancement something like this:

```
// Register the function, if it does not already exist.
if (!window.slideFunctions['my-template-id']) {
  window.slideFunctions['my-template-id'] = {
    /**
     * Setup the slide for rendering.
     * @param scope
     *   The slide scope.
     */
    setup: function setupMyTemplate(scope) {
      // Get subslides (that is the data items), num_subslides, and slide_duration
      // and call the slides-in-slides tool with those values.
      window.slidesInSlides.setup(scope, subslides, num_subslides, slide_duration);
    },

    /**
     * Run the slide.
     *
     * @param slide
     *   The slide.
     * @param region
     *   The region to call when the slide has been executed.
     */
    run: function runMyTemplate(slide, region) {
      window.slidesInSlides.run(slide, region);
    }
  };
}
```

Fetching data on Cron
---------------------

[](#fetching-data-on-cron)

Create a service in your bundle that implements Symfony's `EventSubscriberInterface`. In the `getSubscribedEvents` function, use something like this:

```
  public static function getSubscribedEvents()
  {
    return [
      'os2displayslidetools.sis_cron.your_cron_key' => [
        ['myFunctionToGetData'],
      ]
    ];
  }
```

See [this bundle](https://github.com/kkos2/os2display-admin) for some examples on how to use this tool with cron.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 77.1% of commits — single point of failure

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 ~89 days

Recently: every ~134 days

Total

11

Last Release

1774d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a7ad4d54daf1994f9c176af5dacde72d09d9f4b5d29b240bd3c554687b5b395d?d=identicon)[arnested](/maintainers/arnested)

![](https://www.gravatar.com/avatar/9105a47460b277ef22d040f9c7f4adc0902fe872dafd9c7bc104b1310a191c2a?d=identicon)[kasperg](/maintainers/kasperg)

![](https://www.gravatar.com/avatar/04d13838dcb1290a53b059b0a481b7eebc98f32a718dc32a2d348e5bec520ce0?d=identicon)[naxoc](/maintainers/naxoc)

![](https://www.gravatar.com/avatar/a6587321a256fa19ef5f752e49eb3557cfb1cda76186ddafca751b0bcbd63209?d=identicon)[danquah](/maintainers/danquah)

---

Top Contributors

[![naxoc](https://avatars.githubusercontent.com/u/193283?v=4)](https://github.com/naxoc "naxoc (27 commits)")[![matis-dk](https://avatars.githubusercontent.com/u/32526593?v=4)](https://github.com/matis-dk "matis-dk (4 commits)")[![danquah](https://avatars.githubusercontent.com/u/999542?v=4)](https://github.com/danquah "danquah (3 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

### Embed Badge

![Health badge](/badges/reload-os2display-slide-tools/health.svg)

```
[![Health](https://phpackages.com/badges/reload-os2display-slide-tools/health.svg)](https://phpackages.com/packages/reload-os2display-slide-tools)
```

###  Alternatives

[hirethunk/verbs

An event sourcing package that feels nice.

513162.9k6](/packages/hirethunk-verbs)

PHPackages © 2026

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