PHPackages                             xanweb/c5-helpers - 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. xanweb/c5-helpers

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

xanweb/c5-helpers
=================

ConcreteCMS Helpers Suite

v2.1(4y ago)36022MITPHPPHP &gt;=7.4

Since Feb 18Pushed 4mo ago4 watchersCompare

[ Source](https://github.com/Xanweb/c5-helpers)[ Packagist](https://packagist.org/packages/xanweb/c5-helpers)[ RSS](/packages/xanweb-c5-helpers/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (9)Dependencies (1)Versions (13)Used By (2)

ConcreteCMS Helpers Suite
=========================

[](#concretecms-helpers-suite)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1153dc3d524020f82104e2fe9c303a820e5db9cb780a68e9c5562bc2d41bf4e4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f78616e7765622f63352d68656c706572732e7376673f6d61784167653d32353932303030267374796c653d666c61742d737175617265)](https://packagist.org/packages/xanweb/c5-helpers)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

Collection of useful helpers for ConcreteCMS

- `in_array_all` Verify that all needles are in haystack array.
- `in_array_any` Verify that at least one of needles is in haystack array.
- `strip_spaces` Remove all spaces from the given string.
- `current_locale` Get Current Page Locale.
- `current_language` Get Current Page Language.
- `active_locale` An Alias of \\Localization::activeLocale().
- `active_language` An Alias of \\Localization::activeLanguage().
- `theme_path` Get Site Theme Path
- `c5_date_format` An Alias of \\Concrete\\Core\\Localization\\Service\\Date::formatDate().
- `c5_date_format_custom` An Alias of \\Concrete\\Core\\Localization\\Service\\Date::formatCustom().
- `Xanweb\Helper\Page::getBlock` and `Xanweb\Helper\Page::getBlocks` for fetching block(s) from page

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

[](#installation)

Include library to your composer.json

```
composer require xanweb/c5-helpers
```

#### Usage of Xanweb\\Helper\\Page

[](#usage-of-xanwebhelperpage)

```
    use Xanweb\Helper\Page as PageHelper;

    $ph = new PageHelper(
        $page, // Page Object
        ['Header', 'Footer'], // Optional argument to exclude some areas from fetching
        ['Main'] // Optional argument to include some areas in fetching
    );

    // Get the first valid instance of required block
    $contentBlockController = $ph->getBlock(
        'content', // Block Type Handle
        function (BlockController $bController) { // Optional callable to test for valid block
            return !empty($bController->getContent());
        }
    );

    // Get the first valid instances of required blocks
    $blocksControllers = $ph->getBlocks(
        ['image', 'content'], // Block Types Handle
        function (BlockController $bController) { // Optional callable to test for valid block
            if ($bController instanceof \Concrete\Block\Image\Controller) {
                return is_object($this->getFileObject());
            }

            if ($bController instanceof \Concrete\Block\Content\Controller) {
                return !empty($bController->getContent());
            }

            return false;
        }
    );

    /**
     *  - $blocksControllers array is indexed by btHandle: ['image' => $bController, 'content' => $bController]
     *  - If no block is found $blocksControllers will be an empty array
     */
```

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance50

Moderate activity, may be stable

Popularity18

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity63

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

Recently: every ~44 days

Total

10

Last Release

1635d ago

Major Versions

v1.3.1 → v2.02021-09-10

PHP version history (2 changes)v1.0PHP &gt;=7.2

v2.0PHP &gt;=7.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13836863?v=4)[Hamed Darragi](/maintainers/HamedDarragi)[@HamedDarragi](https://github.com/HamedDarragi)

![](https://www.gravatar.com/avatar/1dd53993230808592bc8c88ff7027bfc943ba836ce7ef3d558ad64347ade7f49?d=identicon)[rii-J](/maintainers/rii-J)

---

Top Contributors

[![HamedDarragi](https://avatars.githubusercontent.com/u/13836863?v=4)](https://github.com/HamedDarragi "HamedDarragi (46 commits)")

---

Tags

concrete5concrete5-v8concretecmsconcretecms-v9helpersphpphp7helpersconcrete5concreteCMSconcrete5-v8concrete5-v9

### Embed Badge

![Health badge](/badges/xanweb-c5-helpers/health.svg)

```
[![Health](https://phpackages.com/badges/xanweb-c5-helpers/health.svg)](https://phpackages.com/packages/xanweb-c5-helpers)
```

PHPackages © 2026

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