PHPackages                             yireo-training/magento2-example-plugin-inject-variables-into-block - 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. yireo-training/magento2-example-plugin-inject-variables-into-block

ActiveMagento2-module[Framework](/categories/framework)

yireo-training/magento2-example-plugin-inject-variables-into-block
==================================================================

Example Magento 2 module showing how to use an interceptor to extend Block classes

4792PHP

Since Aug 19Pushed 5y ago2 watchersCompare

[ Source](https://github.com/yireo-training/magento2-example-plugin-inject-variables-into-block)[ Packagist](https://packagist.org/packages/yireo-training/magento2-example-plugin-inject-variables-into-block)[ RSS](/packages/yireo-training-magento2-example-plugin-inject-variables-into-block/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Example Block interceptor
=========================

[](#example-block-interceptor)

Example Magento 2 module showing how to use an interceptor to extend Block classes

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

[](#installation)

To install use the following composer command:

```
composer require yireo-training/magento2-example-plugin-inject-variables-into-block:dev-master

```

Next enable the module:

```
bin/magento module:enable Yireo_ExamplePluginInjectVariablesIntoBlocks
bin/magento setup:upgrade

```

And flush the cache:

```
bin/magento cache:clean

```

Proof of concept
================

[](#proof-of-concept)

The block with XML layout name `absolute_footer` should be replaced with a new PHTML template that also includes an `$customer` variable.

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 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/4a6a4e3ec0e7f3a8d2d223c90c5545319fc0a382afd3bc10cd910fedc0fa8f5d?d=identicon)[yireo-training](/maintainers/yireo-training)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/yireo-training-magento2-example-plugin-inject-variables-into-block/health.svg)

```
[![Health](https://phpackages.com/badges/yireo-training-magento2-example-plugin-inject-variables-into-block/health.svg)](https://phpackages.com/packages/yireo-training-magento2-example-plugin-inject-variables-into-block)
```

###  Alternatives

[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k104.3M841](/packages/laravel-socialite)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k38.6M289](/packages/laravel-dusk)[nineinchnick/edatatables

Grid widget for the Yii Framework, wrapper for the DataTables jQuery plugin

173.2k](/packages/nineinchnick-edatatables)[link-cloud/fast-hyperf

LinkCloud Fast Hyperf

241.2k1](/packages/link-cloud-fast-hyperf)

PHPackages © 2026

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