PHPackages                             thecodingmachine/easy-entity-reader - 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. [Database &amp; ORM](/categories/database)
4. /
5. thecodingmachine/easy-entity-reader

ActiveDrupal-module[Database &amp; ORM](/categories/database)

thecodingmachine/easy-entity-reader
===================================

This Drupal 8 module helps developers access entity content.

1.0.x-dev(8y ago)211.9k2MITPHPPHP &gt;=7.0

Since Jan 19Pushed 8y ago7 watchersCompare

[ Source](https://github.com/thecodingmachine/easy-entity-reader)[ Packagist](https://packagist.org/packages/thecodingmachine/easy-entity-reader)[ RSS](/packages/thecodingmachine-easy-entity-reader/feed)WikiDiscussions 1.0 Synced 4w ago

READMEChangelogDependencies (3)Versions (1)Used By (0)

Easy Entity Adapter
===================

[](#easy-entity-adapter)

This package targets Drupal 8.

It offers developers a friendly way of accessing their entities.

[![Latest Stable Version](https://camo.githubusercontent.com/29eb301fe4914433eeebf4c96af751522ccb2c095365a9ae719532639d1f964a/68747470733a2f2f706f7365722e707567782e6f72672f746865636f64696e676d616368696e652f656173792d656e746974792d7265616465722f762f737461626c65)](https://packagist.org/packages/thecodingmachine/easy-entity-reader)[![Total Downloads](https://camo.githubusercontent.com/a622b5ad15ae571b262a9d47e2f1bfcff21990e9767de6916075d0f02867571b/68747470733a2f2f706f7365722e707567782e6f72672f746865636f64696e676d616368696e652f656173792d656e746974792d7265616465722f646f776e6c6f616473)](https://packagist.org/packages/thecodingmachine/easy-entity-reader)[![Latest Unstable Version](https://camo.githubusercontent.com/787a830c8e6a78b9728121793235dcabfb51eaaf507b734e5db76ed4d5b26e29/68747470733a2f2f706f7365722e707567782e6f72672f746865636f64696e676d616368696e652f656173792d656e746974792d7265616465722f762f756e737461626c65)](https://packagist.org/packages/thecodingmachine/easy-entity-reader)[![License](https://camo.githubusercontent.com/c4b71a27e5331eb76df7af6d004c6ed0bc3caa725cbd67d31b8b6e7d1bbf8fc3/68747470733a2f2f706f7365722e707567782e6f72672f746865636f64696e676d616368696e652f656173792d656e746974792d7265616465722f6c6963656e7365)](https://packagist.org/packages/thecodingmachine/easy-entity-reader)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/0e2aee7f0d04532d2599f17fc5a24bdce544ad4e83c1a44d2c707deecb640316/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f746865636f64696e676d616368696e652f656173792d656e746974792d7265616465722f6261646765732f7175616c6974792d73636f72652e706e673f623d312e30)](https://scrutinizer-ci.com/g/thecodingmachine/easy-entity-reader/?branch=1.0)[![Build Status](https://camo.githubusercontent.com/cd1d9e7594bc47193705bfbc64eac07d15d5a8f27d2b9a8ca5a6b1651a7c1dca/68747470733a2f2f7472617669732d63692e6f72672f746865636f64696e676d616368696e652f656173792d656e746974792d7265616465722e7376673f6272616e63683d312e30)](https://travis-ci.org/thecodingmachine/easy-entity-reader)[![Coverage Status](https://camo.githubusercontent.com/01c63dd5f5384d79974376d011e180d2a5e991e68b9fe3324b5379562e353b95/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f746865636f64696e676d616368696e652f656173792d656e746974792d7265616465722f62616467652e7376673f6272616e63683d312e3026736572766963653d676974687562)](https://coveralls.io/github/thecodingmachine/easy-entity-reader?branch=1.0)

Why?
----

[](#why)

Drupal has kind of a very verbose syntax to access entities.

Fed up of typing code like this?

```
$entity->get('field_my_field')->getValue()[0]['value']
```

This package has the solution for you!

How does it works?
------------------

[](#how-does-it-works)

This package registers in the Drupal container a new service: `easy_entity_adapter.wrapper`.

This service can "wrap" an entity into another object that is way easier to access. You can access values of the "wrapped" entity directly (using the array access notation).

Here is a sample:

```
// Let's assume you have a $entity variable containing an entity.

$wrapper = \Drupal::get('easy_entity_adapter.wrapper');

$easyEntity = $wrapper->wrap($entity);

// Now, you can access parts of your entity very easily.

$title = $easyEntity['title']; // $title is directly a string
$references = $easyEntity['my_custom_references']; // If the cardinality of the 'my_custom_references' is > 1, then the $references is automatically an array.
// Even better, referenced nodes are automatically fetched and converted into wrapped entities.

// So you can do something like:
$titleOfTheReferencedNode = $easyEntity['my_custom_references'][0]['title'];
```

Install
-------

[](#install)

Simply use:

```
composer require thecodingmachine/easy.entity.adapter
```

Twig integration
----------------

[](#twig-integration)

From Twig, you can wrap an entity into the adapter using the `easy_entity` function.

For instance:

```
{{ easy_entity(node).title }}
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

3085d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1104771?v=4)[mouf](/maintainers/mouf)[@Mouf](https://github.com/Mouf)

![](https://avatars.githubusercontent.com/u/1847918?v=4)[TheCodingMachine](/maintainers/thecodingmachine)[@thecodingmachine](https://github.com/thecodingmachine)

---

Top Contributors

[![moufmouf](https://avatars.githubusercontent.com/u/1290952?v=4)](https://github.com/moufmouf "moufmouf (7 commits)")

### Embed Badge

![Health badge](/badges/thecodingmachine-easy-entity-reader/health.svg)

```
[![Health](https://phpackages.com/badges/thecodingmachine-easy-entity-reader/health.svg)](https://phpackages.com/packages/thecodingmachine-easy-entity-reader)
```

###  Alternatives

[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M412](/packages/drupal-core-recommended)

PHPackages © 2026

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