2017 © Pedro Peláez
 

magento2-module magento2-example-plugin-inject-variables-into-block

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

image

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

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

  • Thursday, July 5, 2018
  • by yireo-training
  • Repository
  • 2 Watchers
  • 1 Stars
  • 53 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 1 Versions
  • 26 % Grown

The README.md

Example Block interceptor

Example Magento 2 module showing how to use an interceptor to extend Block classes, (*1)

Installation

To install use the following composer command:, (*2)

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

Next enable the module:, (*3)

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

And flush the cache:, (*4)

bin/magento cache:clean

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., (*5)

The Versions

05/07 2018

dev-master

9999999-dev https://github.com/yireo-training

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

  Sources   Download

OSL-3.0

The Requires

  • php >=7.0.0
  • magento/framework ^100.1.0|^101.0.0

 

The Development Requires

by Jisse Reitsma (Yireo)

composer-installer magento