Last active
April 18, 2016 02:04
-
-
Save kurozumi/ded73ce7f88991e47fd86b4eea84d9a8 to your computer and use it in GitHub Desktop.
【EC-CUBE3】プラグインを有効化した時にブロックを生成するプラグインの作り方
This file contains 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 | |
/* | |
* This file is part of the SampleBlock | |
* | |
* Copyright (C) 2016 kurozumi | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source code. | |
*/ | |
namespace Plugin\SampleBlock\ServiceProvider; | |
use Eccube\Application; | |
use Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy; | |
use Monolog\Handler\FingersCrossedHandler; | |
use Monolog\Handler\RotatingFileHandler; | |
use Monolog\Logger; | |
use Plugin\SampleBlock\Form\Type\SampleBlockConfigType; | |
use Silex\Application as BaseApplication; | |
use Silex\ServiceProviderInterface; | |
use Symfony\Component\Yaml\Yaml; | |
class SampleBlockServiceProvider implements ServiceProviderInterface | |
{ | |
public function register(BaseApplication $app) | |
{ | |
// ブロックのルーティング設定。ルーティング名の接頭辞にblock_を付ける | |
$app->match('/block/sample_block', '\Plugin\SampleBlock\Controller\Block\SampleBlockController::index') | |
->bind('block_sample_block'); | |
} | |
public function boot(BaseApplication $app) | |
{ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment