Sachin Badase, Author at Perficient Blogs https://blogs.perficient.com/author/sbadase/ Expert Digital Insights Wed, 19 Jun 2024 18:54:56 +0000 en-US hourly 1 https://blogs.perficient.com/files/favicon-194x194-1-150x150.png Sachin Badase, Author at Perficient Blogs https://blogs.perficient.com/author/sbadase/ 32 32 30508587 How to Check for Dependency Injection Information in Magento 2 https://blogs.perficient.com/2022/09/19/how-to-check-for-dependency-injection-information-in-magento-2/ https://blogs.perficient.com/2022/09/19/how-to-check-for-dependency-injection-information-in-magento-2/#respond Tue, 20 Sep 2022 04:34:05 +0000 https://blogs.perficient.com/?p=318902

Whenever I use Magento to troubleshoot a project-specific problem, I discover a cool functionality that I was unaware of. This time, use “bin/magento dev:di:info” with Magento!

If you supply a class as a string to this command, you will receive:

  • The preferred class of this class or interface, or the preference.
  • The parameters this preference receives, together with the required values and types for each
  • Plugins that connect to this interface
  • Any plugins for this interface’s relevant preference

ex: bin/magento dev:di:info “Magento\Catalog\Model\Category”

Outnew

When attempting to figure out what is going on with all of the dependency injection information preferences set throughout your Magento store, this can be VERY helpful. Particularly when you are attempting to grasp Magento or have a truly challenging troubleshooting circumstance.

]]>
https://blogs.perficient.com/2022/09/19/how-to-check-for-dependency-injection-information-in-magento-2/feed/ 0 318902
Let’s Learn About UI Components in Magento 2 https://blogs.perficient.com/2022/09/05/lets-learn-about-ui-components-in-magento-2/ https://blogs.perficient.com/2022/09/05/lets-learn-about-ui-components-in-magento-2/#comments Mon, 05 Sep 2022 06:46:26 +0000 https://blogs.perficient.com/?p=317555

One of the elements of Magento that can be the most confusing is UI Components. The uiRegistry is one of the tools that will aid in your comprehension of them.

 

Uicompo

The uiRegistry performs several functions, but its most significant feature is the ability to thoroughly debug every UI component registered and loaded on a page.

Simply call get() with a function callback to do something that logs information about all components to the developer console.

You can obtain information about that component by giving a string to get() along with the name of the desired UI Component. To access a specific prop value directly, add a period and the property’s name.

You need to set a value for debugging. The chain is on a call to set with a prop name and value you want to set().

Are you prepared to try something new? Use one of these lines to assist you in investigating the situation by opening the browser dev console.

Start right away by performing the following in your browser’s dev console on a Magento page (perhaps the checkout):

require(‘uiRegistry’).

console.log(uiItem) => get(uiItem)

Find out more about the uiRegistry by exploring it!

]]>
https://blogs.perficient.com/2022/09/05/lets-learn-about-ui-components-in-magento-2/feed/ 11 317555