PHPackages                             kaliop/content-decorator-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. kaliop/content-decorator-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

kaliop/content-decorator-bundle
===============================

Decorate your Ibexa content with custom model classes.

v1.1.2(2mo ago)2234↑133.3%1MITPHPPHP ^8.1CI passing

Since Mar 5Pushed 3w agoCompare

[ Source](https://github.com/kaliop/content-decorator-bundle)[ Packagist](https://packagist.org/packages/kaliop/content-decorator-bundle)[ Docs](https://github.com/kaliop/content-decorator-bundle)[ RSS](/packages/kaliop-content-decorator-bundle/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (8)Dependencies (24)Versions (6)Used By (0)

Kaliop Content Decorator Bundle
===============================

[](#kaliop-content-decorator-bundle)

Kaliop Content Decorator Bundle is an Ibexa extension inspired by [eZObjectWrapperBundle](https://github.com/kaliop/ezobjectwrapper). It lets you work with Ibexa `Content` objects as typed models plus dedicated repositories.

Instead of using raw content objects everywhere, you map content types to custom classes extending `Kaliop\Contracts\ContentDecorator\Model\ContentDecorator`.

Compatibility
-------------

[](#compatibility)

Bundle lineIbexaSymfonyPHP1.x4.65.4 LTS&gt;= 8.12.x5.07.4 LTS&gt;= 8.3Installation
------------

[](#installation)

```
composer require kaliop/content-decorator-bundle
```

If Symfony Flex does not enable the bundle automatically, register it in `config/bundles.php`:

```
return [
    Kaliop\Bundle\ContentDecorator\KaliopContentDecoratorBundle::class => ['all' => true],
];
```

Quick Start
-----------

[](#quick-start)

1. Configure mappings:

```
# config/packages/kaliop_content_decorator.yaml
kaliop_content_decorator:
    default_class: App\Model\GenericContent
    default_repository_class: Kaliop\ContentDecorator\Repository\ContentRepository
    mappings:
        App:
            namespace: 'App\Model'
            dir: '%kernel.project_dir%/src/Model'
```

2. Create a decorator class:

```
