Top 30 Magneto Extension Questions and Answers

Magneto Extension Questions

Magneto Extension Multiple Choice Questions (MCQs)

Question#1 What is the CLI command to list all the commands?
select the correct option from below
i)magento cli_all

ii)magento list

iii)magento cli_list

iv)magento list_all

Answer- magento list

Question#2 _ is a software design pattern that allows a class to specify its dependencies without having to construct them.
select the correct option from below
i)Events and observers

ii)Plugins

iii)Dependency injection

Answer- Dependency injection

Question#3 In which file you can define your dependency for a class in Magento?
select the correct option from below
i)system.xml

ii)webapi.xml

iii)acl.xml

iv)di.xml

Answer- di.xml

Question#4 cache:flush command removes all the cache, including the third-party libraries cache data.
select the correct option from below
i)True

ii)False

Answer- True

Question#5 When the dependency inversion principle is applied, it means high-level classes are not working directly with low-level classes.
select the correct option from below
i)True

ii)False

Answer- True

Question#6 cache:clean command removes all the cache, including the third-party libraries cache data.
select the correct option from below
i)True

ii)False

Answer- False

Question#7 Which of the following is incorrect regarding the dependency inversion principle?
select the correct option from below
i)Your high-level classes should use the interfaces of low-level classes instead of working with them directly.

ii)None of the options

iii)Using interfaces in your code reduces the risk of incompatibility bugs when Magento changes the underlying implementation of those interfaces.

iv)Reduces code dependency using abstractions in your code.

Answer- Your high-level classes should use the interfaces of low-level classes instead of working with them directly.

Question#8 __ CLI command is used to uninstall a module.
select the correct option from below
i)php bin/magento unistall -m module

ii)php bin/magento module-unistall

iii)php bin/magento module:unistall

Answer- php bin/magento module:unistall

Question#9 __ method return value will substitute the original method return value.
select the correct option from below
i)around

ii)after

iii)before

iv)None of the options

Answer- before

Question#10 Proxy initiates dependency in __ approach.
select the correct option from below
i)Publish-subscribe

ii)lazy load

iii)Data render

Answer- lazy load

Question#11 Newable objects cannot be injected.
select the correct option from below
i)True

ii)False

Answer- True

Question#12 __ blocks generate the actual content for the display, where you need to assign to one of the structural blocks for frontend display.
select the correct option from below
i)Structural blocks

ii)Content blocks

Answer- Content blocks

Question#13 Observers names can be similar in an event definition.
select the correct option from below
i)True

ii)False

Answer- False

Question#14 Events are dispatched using MagentoFrameworkEventMaganer class.
select the correct option from below
i)True

ii)False

Answer- True

Question#15 What are the parameters of the around method?
select the correct option from below
i)subject and proceed

ii)subject, value and proceed

iii)subject and result

iv)subject, proceed and original method parameters

Answer- subject, proceed and original method parameters

Question#16 What is the first step in creating a custom system.xml?
select the correct option from below
i)Creating ACL

ii)Adding default config value

iii)Creating custom system configuration

iv)None of the options

Answer- Creating custom system configuration

Question#17 You have to call _ function to dispatch an event from the event manager class.
select the correct option from below
i)event

ii)system

iii)observer

iv)dispatch

Answer- dispatch

Question#18 Interceptor is used for running plugins.
select the correct option from below
i)True

ii)False

Answer- True

Question#19 Name the two parameters used by the after method.
select the correct option from below
i)subject and result

ii)result and proceed

iii)subject and value

iv)None of the options

Answer- subject and result

Question#20 _ method is used to replace the original method entirely.
select the correct option from below
i)after

ii)before

iii)around

iv)None of the options

Answer- before

Question#21 Events are dispatched by _ when certain actions are trigerred.
select the correct option from below
i)Templates

ii)Plugins

iii)Modules

iv)Themes

Answer- Modules

Question#22 Name the two parameters used by the before method.
select the correct option from below
i)result and value

ii)subject and value

iii)subject and proceed

iv)subject and result

Answer- result and value

Question#23 What are the types of dependencies?
select the correct option from below
i)Newable

ii)Injectable

iii)Both injectable and newable

Answer- Both injectable and newable

Question#24 What all are things that you can configure using di.xml file?
select the correct option from below
i)Connect plugin to class

ii)Create virtual type

iii)Link an injectable interface with correct implementation

iv)All the options

Answer- All the options

Question#25 ObjectManager class is located at which directory?
select the correct option from below
i)vendor/magento/backend/ObjectManager

ii)vendor/magento/framework/ObjectManager

iii)vendor/magento/backend/

iv)vendor/magento/frontend/

Answer- vendor/magento/backend/ObjectManager

Question#26 _ is the DI manager that finds the correct implementations which are required for the original object.
select the correct option from below
i)dependency injection

ii)di.xml

iii)ObjectManager

iv)system.xml

Answer- ObjectManager

Question#27 Where does the global di.xml reside in magento directory?
select the correct option from below
i)frontend/etc/di.xml

ii)module/etc/di.xml

iii)app/etc/di.xml

Answer- module/etc/di.xml

Question#28 Interceptor class gets generated programmatically when the object manager tries to call the instance of the class.
select the correct option from below
i)True

ii)False

Answer- True

About Author


After years of Technical Work, I feel like an expert when it comes to Develop wordpress website. Check out How to Create a Wordpress Website in 5 Mins, and Earn Money Online Follow me on Facebook for all the latest updates.

Leave a Comment