-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathModule.php
More file actions
28 lines (25 loc) · 859 Bytes
/
Module.php
File metadata and controls
28 lines (25 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
namespace ItemCarouselBlock;
use Omeka\Module\AbstractModule;
use Laminas\EventManager\Event;
use Zend\EventManager\SharedEventManagerInterface;
class Module extends AbstractModule
{
public function getConfig()
{
return include sprintf('%s/config/module.config.php', __DIR__);
}
public function attachListeners(SharedEventManagerInterface $sharedEventManager)
{
// Copy ItemCarouselBlock-related data for the CopyResources module.
$sharedEventManager->attach(
'*',
'copy_resources.sites.post',
function (Event $event) {
$copyResources = $event->getParam('copy_resources');
$siteCopy = $event->getParam('resource_copy');
$copyResources->revertSiteBlockLayouts($siteCopy->id(), 'carousel');
}
);
}
}