Last active
May 1, 2020 09:15
-
-
Save hissy/aae644d870f2546b170e7236f5f620e7 to your computer and use it in GitHub Desktop.
[concrete5][V8][MigrationTool] Example of creating custom publisher
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Events::addListener('on_before_dispatch', function($event) { | |
/** @var \PortlandLabs\Concrete5\MigrationTool\Publisher\Block\Manager $blockPublisherManager */ | |
$blockPublisherManager = Core::make('migration/manager/publisher/block'); | |
if (is_object($blockPublisherManager)) { | |
$originalBlockTypeHandle = 'manual_nav'; | |
$blockPublisherManager->extend($originalBlockTypeHandle, function () { | |
return new \Application\Concrete\MigrationTool\Publisher\Block\ManualNavPublisher(); | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment