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;








1















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?










share|improve this question




























    1















    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?










    share|improve this question
























      1












      1








      1








      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?










      share|improve this question














      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






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked May 31 at 7:01









      vitoriodachefvitoriodachef

      1,297424




      1,297424




















          1 Answer
          1






          active

          oldest

          votes


















          1














          $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.






          share|improve this answer

























          • 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











          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
          );



          );













          draft saved

          draft discarded


















          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









          1














          $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.






          share|improve this answer

























          • 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















          1














          $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.






          share|improve this answer

























          • 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













          1












          1








          1







          $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.






          share|improve this answer















          $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.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited May 31 at 8:18

























          answered May 31 at 7:30









          Amit BeraAmit 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

















          • 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

















          draft saved

          draft discarded
















































          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.




          draft saved


          draft discarded














          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





















































          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







          Popular posts from this blog

          Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

          Circuit construction for execution of conditional statements using least significant bitHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Efficiently performing controlled rotations in HHLWould this quantum algorithm implementation work?How to prepare a superposed states of odd integers from $1$ to $sqrtN$?Why is this implementation of the order finding algorithm not working?Circuit construction for Hamiltonian simulationHow can I invert the least significant bit of a certain term of a superposed state?Implementing an oracleImplementing a controlled sum operation

          Magento 2 “No Payment Methods” in Admin New OrderHow to integrate Paypal Express Checkout with the Magento APIMagento 1.5 - Sales > Order > edit order and shipping methods disappearAuto Invoice Check/Money Order Payment methodAdd more simple payment methods?Shipping methods not showingWhat should I do to change payment methods if changing the configuration has no effects?1.9 - No Payment Methods showing upMy Payment Methods not Showing for downloadable/virtual product when checkout?Magento2 API to access internal payment methodHow to call an existing payment methods in the registration form?