【EC-CUBE3】プラグインを有効化したときにdtb_page_layoutにページ情報を登録
<?php | |
/* | |
* This file is part of the SamplePlugin | |
* | |
* Copyright (C) 2017 サンプルプラグイン | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source code. | |
*/ | |
namespace Plugin\SamplePlugin; | |
use Eccube\Application; | |
use Eccube\Plugin\AbstractPluginManager; | |
class PluginManager extends AbstractPluginManager | |
{ | |
/** | |
* プラグインインストール時の処理 | |
* | |
* @param $config | |
* @param Application $app | |
* @throws \Exception | |
*/ | |
public function install($config, Application $app) | |
{ | |
} | |
/** | |
* プラグイン削除時の処理 | |
* | |
* @param $config | |
* @param Application $app | |
*/ | |
public function uninstall($config, Application $app) | |
{ | |
$this->migrationSchema($app, __DIR__.'/Resource/doctrine/migration', $config['code'], 0); | |
} | |
/** | |
* プラグイン有効時の処理 | |
* | |
* @param $config | |
* @param Application $app | |
* @throws \Exception | |
*/ | |
public function enable($config, Application $app) | |
{ | |
$this->migrationSchema($app, __DIR__.'/Resource/doctrine/migration', $config['code']); | |
} | |
/** | |
* プラグイン無効時の処理 | |
* | |
* @param $config | |
* @param Application $app | |
* @throws \Exception | |
*/ | |
public function disable($config, Application $app) | |
{ | |
} | |
/** | |
* プラグイン更新時の処理 | |
* | |
* @param $config | |
* @param Application $app | |
* @throws \Exception | |
*/ | |
public function update($config, Application $app) | |
{ | |
$this->migrationSchema($app, __DIR__.'/Resource/doctrine/migration', $config['code']); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment