PHPackages                             quasiris/quasiris-catching-category-events - 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. quasiris/quasiris-catching-category-events

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

quasiris/quasiris-catching-category-events
==========================================

Catching events about product

00PHP

Since Jul 3Pushed 5y ago1 watchersCompare

[ Source](https://github.com/quasiriskacper/quasiris-catching-category-events)[ Packagist](https://packagist.org/packages/quasiris/quasiris-catching-category-events)[ RSS](/packages/quasiris-quasiris-catching-category-events/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Spryker - QuasirisCatchingCategoryEvents
========================================

[](#spryker---quasiriscatchingcategoryevents)

This library is used to catching events about product from category (abstract, concrete, categories) as like:

- assign,
- unassign

And sending it to custom api url (POST method).

Data comes to api

```
API_URL_MAIN:
{
    "abstract": {},
    "concrete": {},
    "categories": {
        "categories": []
    }
}
API_URL_TESTING:
{
    "status": "SUCCESS",
    "params": {
        "date": "23.06.20 10:26:06",
        "listenerName": "QuasirisCatchingCategoryEventsListener",
        "eventName": "Product.product_abstract.after.update",
        "abstract": {

        },
        "concrete": [],
        "categories": {
            "categories": []
        },
        "productId": "//id of product",
        "type": "products"
    },
    "eventName": "Product.product_abstract.after.update",
    "request_form_params_main_api": "params with goes to api",
    "response_from_main_api": {},
    "url_main_api": "API_URL_MAIN",
    "url_testing_api": "API_URL_TESTING",
    "product_id": "//id of product"
}
```

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

[](#installation)

If you dont have install composer go to [composer website](https://getcomposer.org/download/) and install it.

Type in your project terminal:

```
composer require quasiris/quasiris-catching-category-events
```

Usage
-----

[](#usage)

After installation, go to Pyz\\Zed\\Event\\EventDependencyProvider.php;

Import subscriber:

```
use Quasiris\Zed\QuasirisCatchingCategoryEvents\Communication\Plugins\Event\Subscriber\QuasirisCatchingCategoryEventsSubscriber;
```

next in getEventSubscriberCollection() method, above return $eventSubscriberCollection;, register events to watch:

```
$eventSubscriberCollection->add(new QuasirisCatchingCategoryEventsSubscriber());
```

All implementation Pyz\\Zed\\Event\\EventDependencyProvider.php:

```
