PHPackages                             pragmatic-modules/jslayout-parser - 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. pragmatic-modules/jslayout-parser

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

pragmatic-modules/jslayout-parser
=================================

Lightweight PHP library that was created to make work with `$jsLayout` in Magento 2 less spaghetti, and more object-oriented.

1.0.0(4y ago)356.8k↑109.5%4MITPHP

Since Feb 3Pushed 4y ago1 watchersCompare

[ Source](https://github.com/pragmatic-modules/jslayout-parser)[ Packagist](https://packagist.org/packages/pragmatic-modules/jslayout-parser)[ Docs](https://rusin.work)[ RSS](/packages/pragmatic-modules-jslayout-parser/feed)WikiDiscussions main Synced yesterday

READMEChangelog (1)DependenciesVersions (2)Used By (0)

JS Layout Parser
================

[](#js-layout-parser)

Lightweight standalone PHP library that was created to make work with `$jsLayout` in Magento 2 less spaghetti, and more object-oriented.

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

[](#installation)

```
composer require pragmatic-modules/jslayout-parser

```

Usage On Checkout
-----------------

[](#usage-on-checkout)

Add new layout processor by implementing `LayoutProcessorInterface`, and inject it into `layoutProcessors` array.

File: `etc/frontend/di.xml`

```

                Pragmatic\Example\Block\Checkout\ExampleProcessor

```

Inject `Pragmatic\JsLayoutParser\Model\JsLayoutParser` into processor and parse `$jsLayout` for selected root component.

You can find a list of available component methods below.

```
