group behaviors

This commit is contained in:
Jean-Christian Denis 2022-12-25 21:34:36 +01:00
parent 38e38b74bf
commit d657d5b0e2
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951

View file

@ -28,54 +28,20 @@ if (!dcCore::app()->auth->check(dcCore::app()->auth->makePermissions([
} }
# Admin behaviors # Admin behaviors
dcCore::app()->addBehavior( dcCore::app()->addBehaviors([
'adminPostsActions', 'adminPostsActions' => ['adminBehaviorPostExpired', 'adminPostsActions'],
['adminBehaviorPostExpired', 'adminPostsActions'] 'adminPagesActions' => ['adminBehaviorPostExpired', 'adminPostsActions'],
); 'adminPostHeaders' => ['adminBehaviorPostExpired', 'adminPostHeaders'],
dcCore::app()->addBehavior( 'adminPageHeaders' => ['adminBehaviorPostExpired', 'adminPostHeaders'],
'adminPagesActions', 'adminPostFormItems' => ['adminBehaviorPostExpired', 'adminPostFormItems'],
['adminBehaviorPostExpired', 'adminPostsActions'] 'adminPageFormItems' => ['adminBehaviorPostExpired', 'adminPostFormItems'],
); 'adminBeforePostDelete' => ['adminBehaviorPostExpired', 'adminBeforePostDelete'],
dcCore::app()->addBehavior( 'adminBeforePageDelete' => ['adminBehaviorPostExpired', 'adminBeforePostDelete'],
'adminPostHeaders', 'adminAfterPostUpdate' => ['adminBehaviorPostExpired', 'adminAfterPostSave'],
['adminBehaviorPostExpired', 'adminPostHeaders'] 'adminAfterPageUpdate' => ['adminBehaviorPostExpired', 'adminAfterPostSave'],
); 'adminAfterPostCreate' => ['adminBehaviorPostExpired', 'adminAfterPostSave'],
dcCore::app()->addBehavior( 'adminAfterPageCreate' => ['adminBehaviorPostExpired', 'adminAfterPostSave'],
'adminPageHeaders', ]);
['adminBehaviorPostExpired', 'adminPostHeaders']
);
dcCore::app()->addBehavior(
'adminPostFormItems',
['adminBehaviorPostExpired', 'adminPostFormItems']
);
dcCore::app()->addBehavior(
'adminPageFormItems',
['adminBehaviorPostExpired', 'adminPostFormItems']
);
dcCore::app()->addBehavior(
'adminBeforePostDelete',
['adminBehaviorPostExpired', 'adminBeforePostDelete']
);
dcCore::app()->addBehavior(
'adminBeforePageDelete',
['adminBehaviorPostExpired', 'adminBeforePostDelete']
);
dcCore::app()->addBehavior(
'adminAfterPostUpdate',
['adminBehaviorPostExpired', 'adminAfterPostSave']
);
dcCore::app()->addBehavior(
'adminAfterPageUpdate',
['adminBehaviorPostExpired', 'adminAfterPostSave']
);
dcCore::app()->addBehavior(
'adminAfterPostCreate',
['adminBehaviorPostExpired', 'adminAfterPostSave']
);
dcCore::app()->addBehavior(
'adminAfterPageCreate',
['adminBehaviorPostExpired', 'adminAfterPostSave']
);
/** /**
* @ingroup DC_PLUGIN_POSTEXPIRED * @ingroup DC_PLUGIN_POSTEXPIRED