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

          Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

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

          Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form