Skip to content
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

プラグイン拡張サンプルを追加 #2346

Merged
merged 3 commits into from
May 30, 2017

Conversation

chihiro-adachi
Copy link
Contributor

概要(Overview・Refs Issue)

#2342

方針(Policy)

  • エンティティのイベント、クエリのカスタマイズ拡張について、プラグインからの拡張サンプルコードを作成

実装に関する補足(Appendix)

  • エンティティイベント:c399e14
  • クエリカスタマイズ:cf287c0

テスト(Test)

相談(Discussion)

public function execute(LifecycleEventArgs $eventArgs)
{
/** @var PreUpdateEventArgs $eventArgs */
$new = $eventArgs->getNewValue('company_name');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if ($eventArgs->hasChangedField('company_name')) { ... } で確認しておかないとInvalidArgumentExceptionがスローされてしまいます。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kiy0taka ありがとうございます。修正しました。

@chihiro-adachi chihiro-adachi added this to the 3.1.0 milestone May 30, 2017
@kiy0taka kiy0taka merged commit 777914a into EC-CUBE:experimental/3.1 May 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants