MAGENTO 2 EXAM QUESTIONS AND ANSWERS
Which files are necessary to install - upgrade database tables and to records in it - Answer- o InstallSchema o UpgradeSchema o InstallData o UpgradeData In which file vender path stored and at which location? - Answer- App/etc/vendor_ Which class Magento 2 helper extend? - Answer- MagentoFrameworkAppHelperAbstractHelper What is the difference between cache:clean and cache:flush command? - Answer- o Cache:clean deletes all items from enabled Magento cache types only. But cache:flush physically removes completely the cache storage. o Cache:clean will not clean Disabled cache types. But cache:flush will disabled cache types also. What is resource attribute for admin menu item? - Answer- o 'resource' attribute defines the ACL rule, that a user must have in order to access this Menu Item. o Predefined ACL rule (Magento_Backend::content) from a standard Magento module. o If the logged in user does not have access to the configured ACL rule, the Menu Item will not render for them. What does $this-resultPageFactory-create(); statement means in controller file? - Answer- o In Magento 2 all controller actions must return something, opposed to M1, where a controller action would just output something or did a redirect. o resultPageFactory is an instance of MagentoFrameworkViewResultPageFactory and when calling create() on that class it returns an instance of MagentoFrameworkViewResultPage described above. o When this is used and the result is returned it means that your action will return HTML. o It has somehow a similar effect as $this-loadLayout(); from Magento 1. When you call create on the resultPageFactory object it actually loads the layout.
Written for
- Institution
- MAGENTO 2
- Course
- MAGENTO 2
Document information
- Uploaded on
- September 8, 2023
- Number of pages
- 14
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
magento 2 exam questions and answers
-
which files are necessary to install upgrade dat
-
in which file vender path stored and at which loca
-
which class magento 2 helper extend
Also available in package deal