Skip to main content
20 events
when toggle format what by license comment
Sep 2, 2019 at 13:43 history edited Ronak Chauhan CC BY-SA 4.0
added 232 characters in body
Sep 2, 2019 at 13:38 comment added Ronak Chauhan for new version of magento 2, now we can not use even this way. you have to use repository to get data or create object instance directly with factory. @55840
Aug 26, 2019 at 7:10 comment added Mahendra I am using same way for creating rest API's is it OK???
Apr 30, 2018 at 19:45 history edited Rafael Corrêa Gomes CC BY-SA 3.0
added 8 characters in body
Apr 16, 2018 at 13:43 history edited 7ochem CC BY-SA 3.0
added 190 characters in body
Apr 16, 2018 at 13:21 comment added 7ochem Comment and downvote IS the proper way. I'll edit someone's answer to improve formatting and language/grammar. Changing the actual answer (code or explanation) is violation of the answer to me. But now that I have your consent, I will edit it and upvote again ;)
Apr 16, 2018 at 11:57 comment added Ronak Chauhan downvote any answer is not an appropriate way, If you have better knowledge then you can add your own answer or you can edit any other's answer to get better idea and helpful to others. @7ochem
Apr 16, 2018 at 11:51 comment added Ronak Chauhan Right, edit the answer @7ochem
Apr 10, 2018 at 13:38 comment added 7ochem You should also never use it in events (I guess you mean Observers) and plugins. You should inject the objects that you need, not the ObjectManager. Only in a Factory you could use the ObjectManager and then you should indeed inject it instead of calling ::getInstance()
Feb 1, 2018 at 6:27 history edited Prince Patel CC BY-SA 3.0
deleted 1 character in body
Jan 5, 2018 at 6:06 history edited Prince Patel CC BY-SA 3.0
added 4 characters in body
Sep 29, 2017 at 17:23 comment added Ronak Chauhan Yes, because magento doesn't allow to use direct objectManager, so you have to use this way!
Sep 29, 2017 at 16:04 comment added enrico69 Is it a good practice to use it this way?
S May 13, 2017 at 5:04 history rollback Ronak Chauhan
Rollback to Revision 3 - Edit approval overridden by post owner or moderator
May 13, 2017 at 4:36 history suggested CommunityBot CC BY-SA 3.0
Should not use Object manager directly!! like
May 12, 2017 at 19:26 review Suggested edits
S May 13, 2017 at 5:04
S Mar 23, 2017 at 5:49 history suggested Visakh B Sujathan CC BY-SA 3.0
modified the code
Mar 23, 2017 at 5:30 review Suggested edits
S Mar 23, 2017 at 5:49
Dec 29, 2016 at 5:31 history edited Ronak Chauhan CC BY-SA 3.0
edited body
Oct 14, 2016 at 6:35 history answered Ronak Chauhan CC BY-SA 3.0