New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
命名規約 #6
Comments
@chihiro-adachi プラグインで定義するTwigBlock名についても追記してもらいたいです。 |
BlockPrefix は不要なため折りたたみました。 Form/Type BlockPrefix
public function getBlockPrefix()
{
return 'acme_category_content_admin_config';
} <\details> |
@okazy 本体でついてるのはsymfony2.7での名残ですね。 |
ありがとうございます、了解しました。 |
ルーティングの命名規則はフロント画面と管理画面で分けた方がいいとおもいます。 フロント画面
class PageController extends AbstractController
{
/**
* @Route("/acme_category_content/page", name="acme_category_content_page")
* @Template("@AcmeCategoryContent/page.twig")
*/
public function index(Request $request) 管理画面
class ConfigController extends AbstractController
{
/**
* @Route("/%eccube_admin_route%/acme_category_content/config", name="admin_acme_category_content_config")
* @Template("@AcmeCategoryContent/admin/config.twig")
*/
public function index(Request $request) |
プラグインコード
重複を避けるため,
[ベンダー名][プラグイン]
の形式を推奨キャメルケースで記述する
テーブル名
※プラグイン固有のテーブルを作成する場合
plg_[プラグインコードのスネークケース]_xxx
テーブルのカラム名およびgetter/setter
※traitを使用してカラムを追加する場合
[プラグインコードのスネークケース]_xxx
getter/setterはキャメルケースで記述する
ルーティング
[プラグインコードのスネークケース]_xxx
URL
/[プラグインコードのスネークケース]/xxx/xxx
FormExtensionで追加するフィールド
[プラグインコードのスネークケース]_xxx
htmlで使用するID, class
[プラグインコードのスネークケース]_xxx
コマンド名
[プラグインコードのスネークケース]:xxx:xxx
言語ファイル
[プラグインコードのスネークケース].xxx.xxx
プラグインコード以降の命名規則はEC-CUBE本体の命名規則に従う
EC-CUBE/ec-cube#3593
パラメータ
[プラグインコードのスネークケース].xxx.xxx
The text was updated successfully, but these errors were encountered: