Skip to content

Commit

Permalink
Добавил события при создании вендора modx-pro#861
Browse files Browse the repository at this point in the history
  • Loading branch information
Electrica committed Apr 20, 2023
1 parent 9bc89a2 commit a51d990
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions _build/data/transport.events.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@

'msOnManagerCustomCssJs',

'msOnBeforeVendorCreate',
'msOnAfterVendorCreate',
'msOnBeforeVendorUpdate',
'msOnAfterVendorUpdate',
'msOnBeforeVendorDelete',
'msOnAfterVendorDelete',
];

foreach ($tmp as $k => $v) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ class msVendorCreateProcessor extends modObjectCreateProcessor
public $classKey = 'msVendor';
public $languageTopics = ['minishop2'];
public $permission = 'mssetting_save';
public $beforeSaveEvent = 'msOnBeforeVendorCreate';
public $afterSaveEvent = 'msOnAfterVendorCreate';

/**
* @return bool|null|string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ class msVendorRemoveProcessor extends modObjectRemoveProcessor
public $classKey = 'msVendor';
public $languageTopics = ['minishop2'];
public $permission = 'mssetting_save';
public $beforeRemoveEvent = 'msOnBeforeVendorDelete';
public $afterRemoveEvent = 'msOnAfterVendorDelete';

/**
* @return bool|null|string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ class msVendorUpdateProcessor extends modObjectUpdateProcessor
public $classKey = 'msVendor';
public $languageTopics = ['minishop2'];
public $permission = 'mssetting_save';
public $beforeSaveEvent = 'msOnBeforeVendorUpdate';
public $afterSaveEvent = 'msOnAfterVendorUpdate';

/**
* @return bool|null|string
Expand Down

0 comments on commit a51d990

Please sign in to comment.