PHPackages                             arsthanea/page-media-set-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. [Admin Panels](/categories/admin)
4. /
5. arsthanea/page-media-set-bundle

ActiveLibrary[Admin Panels](/categories/admin)

arsthanea/page-media-set-bundle
===============================

2.0(8y ago)312.3k1[1 issues](https://github.com/syzygypl/page-media-set-bundle/issues)MITPHP

Since Dec 15Pushed 7y ago4 watchersCompare

[ Source](https://github.com/syzygypl/page-media-set-bundle)[ Packagist](https://packagist.org/packages/arsthanea/page-media-set-bundle)[ RSS](/packages/arsthanea-page-media-set-bundle/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (10)Dependencies (1)Versions (15)Used By (0)

Page Media Set
==============

[](#page-media-set)

This bundle provides an easy way to add a collection of media for each page type in [Kunstmaan Bundles CMS](https://bundles.kunstmaan.be/).

The main goal is to have a common set of media attachments across many page types without the hassle of upgrading the db schema every time. For instance, think of adding a top page banner with the same dimensions to every page without the need to add the relations themselves to the entities.

Installation:
-------------

[](#installation)

`composer require arsthanea/page-media-set-bundle`

After installation, add the `PageMediaSetBundle` to your kernel and update your db schema / create migration.

Usage
-----

[](#usage)

There are three main steps:

1. Implement the `HasMediaSetInterface` on your entities. This tells the bundle what types of media will be used for each page.
2. Configure your media types in symfony configuration (see below)
3. You now have an additional „Media Set” tab when editing the page where you can set the media

After setting them there are two ways of accessing them:

### Twig function

[](#twig-function)

There is a simple helper function in twig templates:

```
{% block header %}
    {% set banner = page_media(page, "banner") %}
    {% if banner %}{% endif %}
{% endblock %}
```

### Service in the container

[](#service-in-the-container)

For example in your controller:

```
    /** @var HasMediaSetInterface $page */
    $mediaUrl = $this->get('page_media_set.page_media_set_service')->getPageMedia($page, "banner");
```

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

[](#configuration)

### Available formats

[](#available-formats)

Add to your `config.yml` or similar:

```
page_media_set:
  formats:
    banner:
      min_width: 1920
      min_height: 420
      max_width: 1920
      max_height: 460
    teaser: ~
```

You need to configure all your media types, but the constraints are optional.

### Predefined media set types

[](#predefined-media-set-types)

You can configure the media set definitions using symfony config, instead of returning them using the `getMediaSetDefinition` method.

```
# app/config/config.yml
page_media_set:
  types:
    'Acme\Foo\Bar\BazEntity': [ 'foo', 'bar' ]
```

In this case `Acme\Foo\Bar\BazEntity::getMediaSetDefinition()` won’t be called, `foo` and `bar` formats will be used.

### Format names

[](#format-names)

Format names are taken from translations, from `messages` dictionary using `page_media_set.format.%s` keys. For instance:

```
# messages.yml
page_media_set:
  format:
    banner: Top page banner
```

### Indexer

[](#indexer)

If you’re using the search bundle, you may enable indexing page thumbnails. The first defined media will be stored in the elasticsearch document under 'photo' key and then you can use it directly on the search results page.

```
# config.yml

page_media_set:
  indexer: true
```

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 90.9% 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 ~101 days

Recently: every ~175 days

Total

10

Last Release

2934d ago

Major Versions

1.3 → 2.0-RC.12018-02-06

### Community

Maintainers

![](https://www.gravatar.com/avatar/8572223899390b494d1282b615009bc2eea5ef1cd6bfc22f6e6b175034dadfe0?d=identicon)[mlebkowski](/maintainers/mlebkowski)

![](https://www.gravatar.com/avatar/94038957ef475f1608e022eadb71293b64df0949b2c9bfa2366e4bfb63d528ad?d=identicon)[Frost\_F0x](/maintainers/Frost_F0x)

---

Top Contributors

[![mlebkowski](https://avatars.githubusercontent.com/u/848731?v=4)](https://github.com/mlebkowski "mlebkowski (10 commits)")[![mdxpl](https://avatars.githubusercontent.com/u/3490896?v=4)](https://github.com/mdxpl "mdxpl (1 commits)")

### Embed Badge

![Health badge](/badges/arsthanea-page-media-set-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/arsthanea-page-media-set-bundle/health.svg)](https://phpackages.com/packages/arsthanea-page-media-set-bundle)
```

PHPackages © 2026

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