PHPackages                             artgris/page-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. artgris/page-bundle

ActiveSymfony-bundle[Admin Panels](/categories/admin)

artgris/page-bundle
===================

add a page manager to EasyAdminBundle for Symfony

4.2.2(2y ago)151.5k↓100%2[1 issues](https://github.com/artgris/PageBundle/issues)MITPHP

Since Jun 2Pushed 2y ago2 watchersCompare

[ Source](https://github.com/artgris/PageBundle)[ Packagist](https://packagist.org/packages/artgris/page-bundle)[ RSS](/packages/artgris-page-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (38)Used By (0)

Artgris Page
============

[](#artgris-page)

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

[](#installation)

```
composer require artgris/page-bundle

php bin/console doctrine:schema:update --force

```

Configuration:
--------------

[](#configuration)

in config/packages

### configure KnpLabs/DoctrineBehaviors:

[](#configure-knplabsdoctrinebehaviors-httpsgithubcomknplabsdoctrinebehaviors)

- Add locale parameter in services.yaml:

```
parameters:
    locale: 'en'
```

- Add to AppKernel:

```
return [
    ...
    Knp\DoctrineBehaviors\DoctrineBehaviorsBundle::class => ['all' => true],
];
```

- Add to DashboardController.php :

```
use Artgris\Bundle\PageBundle\Entity\ArtgrisPage;

public function configureMenuItems(): iterable
{
     ...
     yield MenuItem::linkToCrud('Page', 'fa fa-file-alt', ArtgrisPage::class);
}
```

### add a2lix\_translation\_form.yaml

[](#add-a2lix_translation_formyaml)

ex:

```
a2lix_translation_form:
    locale_provider: default
    locales: [fr, en]
    default_locale: fr
```

### add artgris\_page.yaml

[](#add-artgris_pageyaml)

not required, no minimal configuration

```
artgris_page:
    controllers: #Namespaces used to load the route selector
        - 'App\Controller\MainController::index'
        - 'App\Controller\Main\'
        - 'App\Controller\'
        - ...
    types: # add your own types
        -   integer: 'Symfony\Component\Form\Extension\Core\Type\IntegerType'
        -   date: 'Symfony\Component\Form\Extension\Core\Type\DateType'
        -   time: 'Symfony\Component\Form\Extension\Core\Type\TimeType'
        -   custom: 'App\Form\CustomType'
        - ...
    default_types: true #load default form types [1]
    hide_route_form: false #to hide the route selector (example of use: one page website)
    redirect_after_update: false #always redirect the user to the configuration page after new/edit action
    use_multiple_a2lix_form: false #to use multiple a2lix form
```

\[1\] Default form types list:

```
source: Artgris\Bundle\PageBundle\Service\TypeService

    'type.text' => ArtgrisTextType::class,  => not required TextType
    'type.textarea' => ArtgrisTextAreaType::class,  => not required TextAreaType with rows = 8 + renderType: \nl2br
    'type.section' => SectionType::class => h2 section, type hidden, to delimit "blocks"
```

Usage:
------

[](#usage)

**1 - Create a page and add blocks**

[![](https://raw.githubusercontent.com/artgris/PageBundle/master/doc/images/configure.png)](https://raw.githubusercontent.com/artgris/PageBundle/master/doc/images/configure.png)

**2 - Edit the content of the blocks**

[![](https://raw.githubusercontent.com/artgris/PageBundle/master/doc/images/edit.png)](https://raw.githubusercontent.com/artgris/PageBundle/master/doc/images/edit.png)

**3 - Retrieve a simple block by tag**

[![](https://raw.githubusercontent.com/artgris/PageBundle/master/doc/images/blok.jpg)](https://raw.githubusercontent.com/artgris/PageBundle/master/doc/images/blok.jpg)

```
{{ blok('title') }}

=> return "My website"

```

use the debugging bar to easily find all blocks by route. (click on block tag to copy/paste code)

[![](https://raw.githubusercontent.com/artgris/PageBundle/master/doc/images/debug_bar.png)](https://raw.githubusercontent.com/artgris/PageBundle/master/doc/images/debug_bar.png)

**Retrieve all blocks of the current page or not linked to a page**

```
bloks()

```

ex:

```
{% for blok in bloks() %}
    {{ blok }}
{% endfor %}

```

**Retrieve all blocks by page tag**

```
page('page-tag')

```

ex:

```
{% for blok in page('homepage') %}
    {{ blok }}
{% endfor %}

```

**Retrieve blocks with a regular expression**

> in an array

```
regex_array_blok('regex-expression')

```

ex:

```
{% for blok in regex_array_blok('^sidebar-*') %}
    {{ blok }}
{% endfor %}

```

> implode in a string

```
regex_blok('regex-expression')

```

ex:

```
{{ regex_blok('^sidebar-*') }}

```

Tips:
-----

[](#tips)

### custom block rendering

[](#custom-block-rendering)

create a form type that implements PageFromInterface:

```
namespace App\Form;

use Artgris\Bundle\PageBundle\Form\Type\PageFromInterface;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\OptionsResolver\OptionsResolver;

class CustomType extends AbstractType implements PageFromInterface
{

    public function configureOptions(OptionsResolver $resolver)
    {
        $resolver->setDefaults([
            'attr' => [
                'class' => 'custom',
            ],
            'required' => false,
        ]);
    }

    public function getParent()
    {
        return TextareaType::class;
    }

    public static function getRenderType($value)
    {
        return $value. '';
    }
}

```

Edit the rendering as you wish using the getRenderType method.

Commands
--------

[](#commands)

Export database model (no values) in a file ("/pages/model.yaml")

```
php bin/console artgris:page:export

```

/pages/model.yaml extract:

```
page-2:
    route: 'App\Controller\Main\MainController::index'
    name: 'page 2'
    blocks:
        blok-10:
            type: Artgris\Bundle\PageBundle\Form\Type\ArtgrisTextType
            name: 'blok 10'
            translatable: false
```

Import model ("/pages/model.yaml") in database

```
php bin/console artgris:page:import

```

add *--remove-deviants* to delete the content of types that have changed (ex: text type in yaml but integer type in bd)

```
php bin/console artgris:page:import --remove-deviants

```

add *--ignore-names* to ignore page and bloc names that have changed

```
php bin/console artgris:page:import --ignore-names

```

Remove extra pages/blocks (in database but not in model.yaml)

```
php bin/console artgris:page:remove:extra

```

Tutorials
---------

[](#tutorials)

- [How to create a TinyMCE Type](doc/tutorials/tinymce.md)

Cache Infos
-----------

[](#cache-infos)

All blocks of the current page or not linked to a page are cached (and present in the debug bar) after calling one of these twig functions:

- bloks()
- blok('block-linked-to-the-current-page') =&gt; via route selector in page configuration
- blok('block-linked-to-any-page') =&gt; route selector left empty

**content added to the cache after the first call:**

- blok('block-of-another-page')

**not in cache, required new db call after each call:**

- page('page-tag')
- regex\_array\_blok('regex-expression')
- regex\_blok('regex-expression')

###  Health Score

36

—

LowBetter than 81% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~47 days

Recently: every ~129 days

Total

36

Last Release

879d ago

Major Versions

1.1.2 → 2.0.12020-10-16

1.2.2 → 2.1.02021-12-14

2.1.0 → 3.0.x-dev2022-02-15

3.0.0 → 4.0.02022-03-25

### Community

Maintainers

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

---

Top Contributors

[![artgris](https://avatars.githubusercontent.com/u/22889596?v=4)](https://github.com/artgris "artgris (89 commits)")

---

Tags

bundleeasyadminbundlesymfonygeneratorbackendadmineasyadmin

### Embed Badge

![Health badge](/badges/artgris-page-bundle/health.svg)

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

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k16.7M308](/packages/easycorp-easyadmin-bundle)[dmstr/yii2-adminlte-asset

AdminLTE backend theme asset bundle for Yii 2.0 Framework

1.1k1.8M67](/packages/dmstr-yii2-adminlte-asset)[yiister/yii2-gentelella

Free admin template for backend

277278.3k5](/packages/yiister-yii2-gentelella)[kiwicommerce/module-cron-scheduler

Easily set up and manage cron jobs from the backend with a beautiful and managed timeline feature. Find the actual load on CPU/Memory by cron job execution.

74603.3k](/packages/kiwicommerce-module-cron-scheduler)[sebastienheyd/boilerplate

Laravel Boilerplate based on AdminLTE 3 with blade components, user management, roles, permissions, logs viewer, ...

28618.2k3](/packages/sebastienheyd-boilerplate)[magenizr/magento2-resetuibookmarks

This Magento 2 module allows you to reset your UI bookmarks such as state of filters, column positions, grid sorting, pagination and so on.

38200.3k](/packages/magenizr-magento2-resetuibookmarks)

PHPackages © 2026

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