PHPackages                             tomatom/atom-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. [Framework](/categories/framework)
4. /
5. tomatom/atom-bundle

ActiveSymfony-bundle[Framework](/categories/framework)

tomatom/atom-bundle
===================

Symfony bundle

3.2.1(4mo ago)51.1k2MITHTMLPHP &gt;=8.1

Since Mar 17Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/TomAtomCZ/AtomBundle)[ Packagist](https://packagist.org/packages/tomatom/atom-bundle)[ RSS](/packages/tomatom-atom-bundle/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (10)Versions (23)Used By (0)

**TomAtom/AtomBundle**
======================

[](#tomatomatombundle)

### **Symfony** Bundle for easy **front-end content editing.**

[](#symfony-bundle-for-easy-front-end-content-editing)

#### Dependencies:

[](#dependencies)

**For Symfony 2/3/4**

- symfony/framework-standard-edition "&gt;=2.8|~3.0|~4.0"
- stof/doctrine-extensions-bundle "~1.2"

**For Symfony 5**

- "symfony/framework-bundle": "~5.1"
- "antishov/doctrine-extensions-bundle": "^1.4"

**For Symfony 6**

- "symfony/framework-bundle": "^6"
- "stof/doctrine-extensions-bundle": "^1.9"

**For Symfony 7**

- "symfony/framework-bundle": "^7"
- "stof/doctrine-extensions-bundle": "^1.10"

**For all**

- jQuery

### Installation:

[](#installation)

- install [stof/doctrine-extensions-bundle - *Translatable* behavior](https://github.com/stof/StofDoctrineExtensionsBundle)([quick installation &amp; config instructions](/doc/gedmo-config.md))
- install bundle

> - for Symfony **~2.8**: `composer require tomatom/atom-bundle "~1.0"`
> - for Symfony **~4.2**: `composer require tomatom/atom-bundle "~2.0"`
> - for Symfony **~5**: `composer require tomatom/atom-bundle "3.0-alpha-5"`
> - for Symfony **~6|~7**: `composer require tomatom/atom-bundle "^3"` (Symfony 6 only – 3.1.2)

### Configuration:

[](#configuration)

**Symfony 6+**

- `bundles.php:`

```
TomAtom\AtomBundle\TomAtomAtomBundle::class => ['all' => true],
```

- `routing.yaml:`

```
atom:
  resource: "@TomAtomAtomBundle/src/Controller/"
  type: attribute
```

- `framework.yaml:`

```
framework:
  # ...
  translator: { fallbacks: [ "%locale%" ] }
```

- `twig.yaml:`

```
twig:
  # ...
  base_template_class: TomAtom\AtomBundle\Twig\Template
```

**Symfony &lt; 6**

- `AppKernel.php:`

```
new TomAtomAtomBundle\TomAtomAtomBundle(),
```

- `routing.yml:`

```
atom:
  resource: "@TomAtomAtomBundle/Controller/"
  type: annotation
```

- `config.yml:`

```
# Make sure translator is uncommented:
framework:
  translator: { fallbacks: [ "%locale%" ] }
# ...

# Twig Configuration
twig:
  base_template_class: TomAtom\AtomBundle\Twig\Template
  # ...
```

**Same for all versions**

- `security.yml:`

```
security:
  # ...
  # add role 'ROLE_ATOM_EDIT':
  role_hierarchy:
    ROLE_ATOM_EDIT: ROLE_USER
    ROLE_ADMIN: ROLE_ATOM_EDIT
    ROLE_SUPER_ADMIN: ROLE_ADMIN
  # ...
```

- `translation.yml:`

```
framework:
  # ...
  # Add enabled locales for multi language application
  enabled_locales: [ 'cs', 'en', 'de' ]
```

- `::base.html.twig` (or your base layout):

```
{# don't forget to include your jQuery (tested with 1.8.3 - 2.1.4, others may work, 3.0 doesn't): #}

{{ render(controller('TomAtom\\AtomBundle\\Controller\\AtomController::_metasAction')) }}
```

- for drag&amp;drop image uploading from editor, **create upload directory**: `/web/uploads/atom`

### Usage:

[](#usage)

- **Atoms intentionally works only in `prod` environment!**They are disabled in `test`, `dev` and all others, so you can always see updated changes right away.
- there are currently 3 **Atom** types:

> - `atom` - **Atom** with rich text editor ([CKEditor](http://ckeditor.com/))
> - `atomline` - **Atom Line** for editing plaintext inside fixed html tags
> - `atomentity` - **Atom Entity** display and update column for given entity

- if you want to use **Atom** in your templates, add Atom tag with *unique* identifier: `{% atom unique_identifier_here %}`and closing tag `{% endatom %}`. You can add default content between tags, which will be persisted on first load.

```
{% atom foo %}
     I am editable!
{% endatom %}
```

- in case you want to edit only text content (like headings or table cells) and don't want to use rich text editor, there is the **Atom Line** tag (again with *unique* identifier): `{% atomline unique_identifier_here %}` and closing `{% endatomline %}`.

```

   {% atomline bar %}
       I am editable!
   {% endatomline %}

```

- for editing other entities, there is **Atom Entity** tag, which takes these arguments:

    - name of Bundle containing desired entity:Entity name (e.g. `AppBundle:Product` / `Product`)
    - name of method used for saving content (usually some setter)
    - entity id
- example (no need to add default value, it will be fetched by appropriate getter):

**Symfony 6+**

```

   {% atomentity Product, setPrice, 123 %}{% endatomentity %}

```

**Symfony &lt; 6**

```

   {% atomentity AppBundle:Product, setPrice, 123 %}{% endatomentity %}

```

### Editable mode

[](#editable-mode)

- entering page with **Atoms** in `prod` environment as user with role `ROLE_ATOM_EDIT` unlocks *editable mode*, which \_ *can be enabled or disabled*\_ by icon in bottom-right corner of browser screen.

### Translations:

[](#translations)

- when switching between locales by changing `_locale` request parameter, you can easily update atoms in specified language. Also Atom Entities can be translated from frontend, if they have implemented Gedmo Translatable behavior.

### Automatic translations:

[](#automatic-translations)

- for automatic translations, you will need a DeepL API key, which you can get [here](https://www.deepl.com/en/pro-api) (Free version offers 500,000 character limit / month) and put that in your `.env.local`, for example:

```
DEEPL_KEY=xxxxxx
```

- they are disabled by default, you can enable them by creating `tom_atom_atom.yaml` in config/packages with these values:

```
tom_atom_atom:
  automatic_translations: true
  deepl_key: '%env(DEEPL_KEY)%' # env for your DeepL API KEY
```

- automatic translations take place only when editing an Atom in your *default\_locale*
- atoms will be translated for all languages in *enabled\_locales*, **even if they had some values before!**

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance75

Regular maintenance activity

Popularity22

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~121 days

Total

21

Last Release

141d ago

Major Versions

1.0 → 2.02019-01-18

2.0.1 → 3.0-alpha-12020-10-05

PHP version history (4 changes)1.0PHP &gt;=5.5.9

3.0-alpha-1PHP &gt;=7.0

3.0.0PHP &gt;=8.0.2

3.1.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/4b48157319455da51aeeb00249e27e6ac3b8d61a2fd389dfa95c18a75a2378d6?d=identicon)[sajfi](/maintainers/sajfi)

---

Top Contributors

[![b3da-cz](https://avatars.githubusercontent.com/u/16703735?v=4)](https://github.com/b3da-cz "b3da-cz (59 commits)")[![Matys333](https://avatars.githubusercontent.com/u/84638491?v=4)](https://github.com/Matys333 "Matys333 (49 commits)")[![sajfi](https://avatars.githubusercontent.com/u/597035?v=4)](https://github.com/sajfi "sajfi (28 commits)")[![tomasfiala555](https://avatars.githubusercontent.com/u/21099403?v=4)](https://github.com/tomasfiala555 "tomasfiala555 (2 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

symfony atom bundle front-end editor

### Embed Badge

![Health badge](/badges/tomatom-atom-bundle/health.svg)

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

###  Alternatives

[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M203](/packages/sulu-sulu)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[kimai/kimai

Kimai - Time Tracking

4.8k9.0k1](/packages/kimai-kimai)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k14](/packages/2lenet-crudit-bundle)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1189.8k](/packages/rcsofttech-audit-trail-bundle)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.1k17.8k](/packages/prestashop-prestashop)

PHPackages © 2026

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