-
-
Save katzueno/8b2a6ea076f3fbba289506fd307ba333 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