PHPackages                             punktde/eel-arrayhelper - 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. punktde/eel-arrayhelper

ActiveNeos-package[Utility &amp; Helpers](/categories/utility)

punktde/eel-arrayhelper
=======================

The package provides an eel-helper with additional methods to work with arrays.

1.9.0(4y ago)325.8k↓39.2%MITPHP

Since Nov 16Pushed 4y ago5 watchersCompare

[ Source](https://github.com/punktDe/eel-arrayhelper)[ Packagist](https://packagist.org/packages/punktde/eel-arrayhelper)[ RSS](/packages/punktde-eel-arrayhelper/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (1)Versions (12)Used By (0)

Neos Eel helper for array handling
==================================

[](#neos-eel-helper-for-array-handling)

[![Latest Stable Version](https://camo.githubusercontent.com/86132c6a87b4924f2bbc01aa7f8afeba1ba2f3a5328240778c463cc599fe2eec/68747470733a2f2f706f7365722e707567782e6f72672f70756e6b7444652f65656c2d617272617968656c7065722f762f737461626c65)](https://packagist.org/packages/punktDe/eel-arrayhelper) [![Total Downloads](https://camo.githubusercontent.com/2b584ea6a6a484ffae88e9ae3343852ce4147b592f10edea1be10bc49e124413/68747470733a2f2f706f7365722e707567782e6f72672f70756e6b7444652f65656c2d617272617968656c7065722f646f776e6c6f616473)](https://packagist.org/packages/punktDe/eel-arrayhelper) [![License](https://camo.githubusercontent.com/e59dd392489d05ad06db7b2fe77afec0dbd86823ae09430a8fe414b3de0d597c/68747470733a2f2f706f7365722e707567782e6f72672f70756e6b7444652f65656c2d617272617968656c7065722f6c6963656e7365)](https://packagist.org/packages/punktDe/eel-arrayhelper)

Installation
------------

[](#installation)

```
composer require punktde/eel-arrayhelper

```

Usage
-----

[](#usage)

This packages provides the methods:

**Sort by Key (ksort)**

```
attributes = Neos.Fusion:RawArray
attributes.@process.ksort = ${PunktDe.Array.ksort(value)}

```

**Sort by sub value**

```
  arrayToSort = [
   ['subValueKey' => "bb"]
   ['subValueKey' => "aa"]
  ]

  sorted = [
   ['subValueKey' => "aa"]
   ['subValueKey' => "bb"]
  ]

attributes.@process.sortBySubValue = ${PunktDe.Array.sortBySubValue(value, 'subValueKey')}

```

**Filter arrays (array\_filter)**

```
attributes.@process.arrayFilter = ${PunktDe.Array.arrayFilter(value)}

```

**Array values (array\_values)**

```
attributes.@process.arrayValues = ${PunktDe.Array.arrayValues(value)}

```

**Array flip (array\_flip)**

```
attributes.@process.arrayFlip = ${PunktDe.Array.arrayFlip(value)}

```

**Add a key/value pair to an array**:

Can be used to add a value with a dynamic key

```
attributes = Neos.Fusion:RawArray
attributes.@process.addKV = ${PunktDe.Array.setKeyValue(value, 'key', 'value')}

```

**Extract Sub Elements**

This method extracts sub elements to the parent level.

```
@process.extractSubElements = ${PunktDe.Array.extractSubElements(value)}

```

An input array of type:

```
[
element1 => [
    0 => 'value1'
],
element2 => [
    0 => 'value2'
    1 => 'value3'
],

```

will be converted to:

```
[
    0 => 'value1'
    1 => 'value2'
    2 => 'value3'
]

```

**Group Elements**

```
@process.groupByKey = ${PunktDe.Array.groupByKey(value, 'group')}

```

Method can be used to convert an array of type

```
 [
     'element1' => [
          'name' => 'theName1',
          'group' => 'theGroup1',
     ],
     'element2' => [
          'name' => 'theName2',
          'group' => 'theGroup2',
     ],
     'element3' => [
          'name' => 'theName2',
          'group' => 'theGroup2',
     ],
]

```

into

```
[
  'theGroup1' => [
     'element1' => [
          'name' => 'theName1',
          'group' => 'theGroup1',
     ],
 ],

 'theGroup2' => [
     'element2' => [
          'name' => 'theName2',
          'group' => 'theGroup2',
     ],
     'element3' => [
          'name' => 'theName2',
          'group' => 'theGroup2',
     ],
   ]
]

```

**Count elements (length)**

The method counts elements of a given array or a countable object.

```
count = ${PunktDe.Array.length(this.rawCollection)}

```

**hasKey(array, key)**

```
bool = ${PunktDe.Array.hasKey(array, key)}

```

**hasValue(array, key)**

```
bool = ${PunktDe.Array.hasValue(array, key)}

```

**getValueByPath(array, path)**

Returns the value of a nested array by following the specified path.

```
result = ${PunktDe.Array.getValueByPath(array, path)}

```

**setValueByPath(subject, path, value)**

Sets the given value in a nested array or object by following the specified path.

```
array = ${PunktDe.Array.setValueByPath(subject, path, value)}

```

**unsetValue(key, array)**

Unset the value for the given key

```
array = ${PunktDe.Array.unsetValue(key, array)}

```

Sponsors &amp; Contributors
---------------------------

[](#sponsors--contributors)

The development of this package is sponsored by [punkt.de GmbH](https://punkt.de/en).

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 78.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 ~158 days

Recently: every ~166 days

Total

11

Last Release

1524d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0fad3b9ab04057e586b701aca7a8dbbf9598718114cdfd6bf85dada030f7688e?d=identicon)[punktde](/maintainers/punktde)

---

Top Contributors

[![daniellienert](https://avatars.githubusercontent.com/u/642226?v=4)](https://github.com/daniellienert "daniellienert (15 commits)")[![andrehoffmann30](https://avatars.githubusercontent.com/u/23524251?v=4)](https://github.com/andrehoffmann30 "andrehoffmann30 (3 commits)")[![fnkr](https://avatars.githubusercontent.com/u/616991?v=4)](https://github.com/fnkr "fnkr (1 commits)")

---

Tags

eelneoscms

### Embed Badge

![Health badge](/badges/punktde-eel-arrayhelper/health.svg)

```
[![Health](https://phpackages.com/badges/punktde-eel-arrayhelper/health.svg)](https://phpackages.com/packages/punktde-eel-arrayhelper)
```

###  Alternatives

[sparkinzy/dcat-marketplace

Dcat扩展市场

381.3k](/packages/sparkinzy-dcat-marketplace)

PHPackages © 2026

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