PHPackages                             stinchjack/helper - 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. stinchjack/helper

ActiveConcrete5-package

stinchjack/helper
=================

Helper classes for Concrete5 V8

011PHP

Since Jun 24Pushed 7y ago1 watchersCompare

[ Source](https://github.com/stinchjack/c5_helper)[ Packagist](https://packagist.org/packages/stinchjack/helper)[ RSS](/packages/stinchjack-helper/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

LDJson Helper classes
=====================

[](#ldjson-helper-classes)

Helper\\LdJson\\LDJsonBlockController
-------------------------------------

[](#helperldjsonldjsonblockcontroller)

Use in place of `Concrete\Core\Block\BlockController`, implementing schemaType() and schemaProperties($fieldData) methods.

e.g

```
namespace Concrete\Package\Extrablocks\Block\Contactdetails;
use Helper\LdJson\LDJsonBlockController;

class Controller extends LDJsonBlockController
{

      protected $btTable = ' ... ';
      public function getBlockTypeName() { ... }

      public function getBlockTypeDescription() { ... }

      protected function schemaType() : string {
        return "ContactPoint";
      }

      protected function schemaProperties($fieldData) : array {

        // $fielddata contains the row from the BlockTypeController's table

        $name = trim($fieldData['honorific'] . ' ' .
          $fieldData['firstName'] . ' ' . $fieldData['lastName']);

        $data = [];

        $data['name'] = $name;

        $data['areaServed'] = $this->makeSchemaProperty(
            'AdministrativeArea',
              ['address' => '123 bonsqde st, Wellington',
              'branchCode'=> 'JW001']
          );

        if ($fieldData['email']) {
          $data['email'] = $fieldData['email'];
        }
        if ($fieldData['phone']) {
          $data['telephone'] = $fieldData['phone'];
        }
        if ($fieldData['fax']) {
          $data['fax'] = $fieldData['fax'];
        }

        return $data;
      }

      public function view($args) {...}
      public function validate($args) {...}

}

```

In view.php, add:

```

```

Helper\\LdJson\\LDJsonBlockController
-------------------------------------

[](#helperldjsonldjsonblockcontroller-1)

Use in place of `Concrete\Core\Block\BlockController`, implementing schemaType() and schemaProperties($fieldData) methods.

e.g

```
namespace Concrete\Package\Extrablocks\Block\Contactdetails;
use Helper\LdJson\LDJsonBlockController;

class Full extends PageTypeController
{

    public function on_start() { ... }
    protected function schemaType() : string {
        return "LocalBusiness";
      }

    protected function schemaProperties($fieldData) : array {
      // $fielddata is null

      $data = [];
      $data['name'] = $name;
      return $data;
    }

    public function view($args) {...}

}

```

In view.php, add:

```

```

Helper\\Block\\RestrictAreaBlockType
====================================

[](#helperblockrestrictareablocktype)

Helps restrict an Area to a single block of a single BlockType by adding a block of the type, and removing delete Permissions for specified groups. Requires advanced permissions to be enabled.

In the template, business as usual:

```

```

In the controller, the following snippet adds an 'image' blockttype to the 'Header' area if the area is empty, removing delete permissions for 'Administrators' and 'Editors' groups.

NB Administrators will still be able to delete the block and replace it with something else. Creating a separate group as such Editors will make this work.

```

use Helper\Block\RestrictAreaBlockType;

class Home extends PageTypeController
{

    public function on_start() { ... }

    public function view() {
      $imageArea = Area::get($this->page, 'Header');

      if ($imageArea) {
        RestrictAreaBlockType::restrictPageAreaBlockType
          ($this->page, Area::get($this->page, 'Header'), 'image', ['Editors', 'Administrators']);
      }

      // ... any other code ...

    }
}

```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

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.

### Community

Maintainers

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

---

Top Contributors

[![stinchjack](https://avatars.githubusercontent.com/u/5456214?v=4)](https://github.com/stinchjack "stinchjack (31 commits)")

### Embed Badge

![Health badge](/badges/stinchjack-helper/health.svg)

```
[![Health](https://phpackages.com/badges/stinchjack-helper/health.svg)](https://phpackages.com/packages/stinchjack-helper)
```

PHPackages © 2026

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