How is $this->eventPrefix built?Magento Event/Observer - access event objectsCustom value into Quote Item table?Where is 'catalog_product_save_before' dispatched?Observer (event hook) for media or imagesHow to Change Order Status After Successful PayPal Express OrderHow to add extension attributes to Customer entity in Magento2?Magento 2: Plugin vs ObserverMagento 2 Checkout event issueIs there any event for after clicking proceed to check out?Magento 2 origData null in customer_save_before
Why can't I use =default for default ctors with a member initializer list
Importance of Building Credit Score?
When would it be advantageous not apply Training Ground's cost reduction?
How to hide an urban landmark?
Implement Own Vector Class in C++
How did old MS-DOS games utilize various graphic cards?
Is it legal for a bar bouncer to confiscate a fake ID
Playing a Character as Unobtrusive and Subservient, Yet Not Passive
Determining fair price for profitable mobile app business
How to hide rifle during medieval town entrance inspection?
Colloquialism for “see you later”
Is it possible to have a wealthy country without a middle class?
Zeros of the Hadamard product of holomorphic functions
What's up with this leaf?
Russian word for a male zebra
How is John Wick 3 a 15 certificate?
Does Disney no longer produce hand-drawn cartoon films?
Is it expected that a reader will skip parts of what you write?
Using "subway" as name for London Underground?
Geopandas and QGIS Calulating Different Polygon Area Values?
Is using haveibeenpwned to validate password strength rational?
How can I make some of my chapters "come to life"?
Arriving at the same result with the opposite hypotheses
Pathfinder warbow concept review
How is $this->eventPrefix built?
Magento Event/Observer - access event objectsCustom value into Quote Item table?Where is 'catalog_product_save_before' dispatched?Observer (event hook) for media or imagesHow to Change Order Status After Successful PayPal Express OrderHow to add extension attributes to Customer entity in Magento2?Magento 2: Plugin vs ObserverMagento 2 Checkout event issueIs there any event for after clicking proceed to check out?Magento 2 origData null in customer_save_before
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
Mangento has something that is called dynamic events. This are events dispatched as follows
$this->eventManager->dispatch($this->eventPrefix . '_load_before')
After what rules is the value in $this->eventPrefix
built and who(which entity) is in charge of doing it?
magento2 event-observer
add a comment |
Mangento has something that is called dynamic events. This are events dispatched as follows
$this->eventManager->dispatch($this->eventPrefix . '_load_before')
After what rules is the value in $this->eventPrefix
built and who(which entity) is in charge of doing it?
magento2 event-observer
add a comment |
Mangento has something that is called dynamic events. This are events dispatched as follows
$this->eventManager->dispatch($this->eventPrefix . '_load_before')
After what rules is the value in $this->eventPrefix
built and who(which entity) is in charge of doing it?
magento2 event-observer
Mangento has something that is called dynamic events. This are events dispatched as follows
$this->eventManager->dispatch($this->eventPrefix . '_load_before')
After what rules is the value in $this->eventPrefix
built and who(which entity) is in charge of doing it?
magento2 event-observer
magento2 event-observer
asked May 31 at 7:01
vitoriodachefvitoriodachef
1,297424
1,297424
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
$this->eventPrefix is a variable which it's default value define at Abstract class like
MagentoFrameworkModelAbstractModel
MagentoFrameworkDataAbstractSearchResult
MagentoFrameworkModelResourceModelDbCollectionAbstractCollection
And it is basically used for model class and collection class. $this->eventPrefix
helo to define some dynamic events base on every entity/Model.
At Magento, most of model & collection classes are inherited from this abstract class.
This variable override by model class.An Example like MagentoCatalogModelProduct
.
protected $_eventPrefix = 'catalog_product';
And MagentoCatalogModelProduct
class extends MagentoFrameworkModelAbstractModel
by inheritance
So, when data load via the model class of product then fire
catalog_product_load_before
Event.
So basically for a custom entity I have to override the eventPrefix value in my model if I want to hook on the custom_entity_load_before event for example?
– vitoriodachef
May 31 at 8:26
yes. you are right. You can override the eventPrfix for your custom entity.
– Amit Bera♦
May 31 at 8:46
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f276819%2fhow-is-this-eventprefix-built%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$this->eventPrefix is a variable which it's default value define at Abstract class like
MagentoFrameworkModelAbstractModel
MagentoFrameworkDataAbstractSearchResult
MagentoFrameworkModelResourceModelDbCollectionAbstractCollection
And it is basically used for model class and collection class. $this->eventPrefix
helo to define some dynamic events base on every entity/Model.
At Magento, most of model & collection classes are inherited from this abstract class.
This variable override by model class.An Example like MagentoCatalogModelProduct
.
protected $_eventPrefix = 'catalog_product';
And MagentoCatalogModelProduct
class extends MagentoFrameworkModelAbstractModel
by inheritance
So, when data load via the model class of product then fire
catalog_product_load_before
Event.
So basically for a custom entity I have to override the eventPrefix value in my model if I want to hook on the custom_entity_load_before event for example?
– vitoriodachef
May 31 at 8:26
yes. you are right. You can override the eventPrfix for your custom entity.
– Amit Bera♦
May 31 at 8:46
add a comment |
$this->eventPrefix is a variable which it's default value define at Abstract class like
MagentoFrameworkModelAbstractModel
MagentoFrameworkDataAbstractSearchResult
MagentoFrameworkModelResourceModelDbCollectionAbstractCollection
And it is basically used for model class and collection class. $this->eventPrefix
helo to define some dynamic events base on every entity/Model.
At Magento, most of model & collection classes are inherited from this abstract class.
This variable override by model class.An Example like MagentoCatalogModelProduct
.
protected $_eventPrefix = 'catalog_product';
And MagentoCatalogModelProduct
class extends MagentoFrameworkModelAbstractModel
by inheritance
So, when data load via the model class of product then fire
catalog_product_load_before
Event.
So basically for a custom entity I have to override the eventPrefix value in my model if I want to hook on the custom_entity_load_before event for example?
– vitoriodachef
May 31 at 8:26
yes. you are right. You can override the eventPrfix for your custom entity.
– Amit Bera♦
May 31 at 8:46
add a comment |
$this->eventPrefix is a variable which it's default value define at Abstract class like
MagentoFrameworkModelAbstractModel
MagentoFrameworkDataAbstractSearchResult
MagentoFrameworkModelResourceModelDbCollectionAbstractCollection
And it is basically used for model class and collection class. $this->eventPrefix
helo to define some dynamic events base on every entity/Model.
At Magento, most of model & collection classes are inherited from this abstract class.
This variable override by model class.An Example like MagentoCatalogModelProduct
.
protected $_eventPrefix = 'catalog_product';
And MagentoCatalogModelProduct
class extends MagentoFrameworkModelAbstractModel
by inheritance
So, when data load via the model class of product then fire
catalog_product_load_before
Event.
$this->eventPrefix is a variable which it's default value define at Abstract class like
MagentoFrameworkModelAbstractModel
MagentoFrameworkDataAbstractSearchResult
MagentoFrameworkModelResourceModelDbCollectionAbstractCollection
And it is basically used for model class and collection class. $this->eventPrefix
helo to define some dynamic events base on every entity/Model.
At Magento, most of model & collection classes are inherited from this abstract class.
This variable override by model class.An Example like MagentoCatalogModelProduct
.
protected $_eventPrefix = 'catalog_product';
And MagentoCatalogModelProduct
class extends MagentoFrameworkModelAbstractModel
by inheritance
So, when data load via the model class of product then fire
catalog_product_load_before
Event.
edited May 31 at 8:18
answered May 31 at 7:30
Amit Bera♦Amit Bera
60.9k1682181
60.9k1682181
So basically for a custom entity I have to override the eventPrefix value in my model if I want to hook on the custom_entity_load_before event for example?
– vitoriodachef
May 31 at 8:26
yes. you are right. You can override the eventPrfix for your custom entity.
– Amit Bera♦
May 31 at 8:46
add a comment |
So basically for a custom entity I have to override the eventPrefix value in my model if I want to hook on the custom_entity_load_before event for example?
– vitoriodachef
May 31 at 8:26
yes. you are right. You can override the eventPrfix for your custom entity.
– Amit Bera♦
May 31 at 8:46
So basically for a custom entity I have to override the eventPrefix value in my model if I want to hook on the custom_entity_load_before event for example?
– vitoriodachef
May 31 at 8:26
So basically for a custom entity I have to override the eventPrefix value in my model if I want to hook on the custom_entity_load_before event for example?
– vitoriodachef
May 31 at 8:26
yes. you are right. You can override the eventPrfix for your custom entity.
– Amit Bera♦
May 31 at 8:46
yes. you are right. You can override the eventPrfix for your custom entity.
– Amit Bera♦
May 31 at 8:46
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f276819%2fhow-is-this-eventprefix-built%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown