What are two functions of a resource model? (Choose two.)
A. It executes create, retrieve, update and delete actions for an entity
B. It loads lists of entity models
C. It is made available in the Magento API for the purpose of data manipulation
D. It maps an entity to one or more database rows
How can you access the select query of a collection?
A. You can only access the select query after the collection has been loaded by calling the public method query()
B. It is stored in a protected variable $query and can only be accessed from the inside of a collection class
C. You can get it by using public method getSelect() which returns an instance of Magento\Framework\DB \Select
D. The select query is not available in the collection class, it will be generated by the MySQL adapter right before executing a query
You have created a new block and will be adding this block on every page. The block contains user-specific information and cannot be cached. The block is added to the default.xml with:
What does this accomplish?
A. The block will be loaded on the store front using AJAX
B. FPC will cache the block content for all cacheable pages
C. FPC will be bypassed for this block and all other page content will be cached
D. All store front pages are no longer cacheable
You are building CLI that use the console to create a customer account with our custom command, Adding a new command to CLI is based on passing on the argument from the XML level to the class. Dependency Injection comes in handy here. you create the file app/code/Mycompany/Customer/etc/di.xml with the following content:
What is the correct in below?
A. Magento\Framework\Console\CommandList
B. Magento\Framework\Console
C. Magento\Framework\CommandList
D. Magento\Framework\CommandList\Console
You have created a module with a custom ACL resource and want to restrict access to resources of your module.
Which three items are restricted based on ACL role permissions? (Choose three.)
A. CLI Commands
B. Webapi resources
C. Storefront login
D. System configuration sections
E. Adminhtml controllers
You are creating a module that will be sold on the Magento Marketplace. You wish for this module to be easily extensible, and decide to add the capability for other developers to utilize extension attributes. What is the minimum update necessary to enable this capability?
A. Add the getExtensionAttributes() method and implement ExtensionAttributesInterface in each model.
B. Create an ExtensionAttributeInterface for each model.
C. Ensure each model extends Magento\Framework\Model\AbstractExtensibleModel.
D. Configure your models in etc/extension_attributes.xml
Products may be accessed using SEO friendly URLs like /my-product instead of /catalog/product/view/id/ {ID}
How is this one?
A. An event observer adds RewriteRules to .htaccess on product save
B. Magento\Catalog\Controller\Product\View::loadByUrlKey loads product pages using the url_key attribute value
C. Using a URL Rewrite stored in the database connecting the request path with the target path
D. A plugin on \Magento\UrlRewrite\Controller\Router::match loads products by the url_key attribute
A client has asked you to include category url keys in product URLs.
How is this done?
A. Create an observer for controller_action_postdispatch_catalog_product_view
B. This is not possible because products can belong to multiple categories
C. Set the configuration value of catalog/seo/product_use_categories to Yes
D. Create an after plugin on \Magento\UrlRewrite\Controller\Router::generateRewrite
You are customizing the display of product details page. On this page ur customer need to change the url in which the product category name will be appear as http://mystore.com/women/tops-women/helenahooded-fleece.html , Keeping ,maintainability in mind.
How to get product url with category?
A. Admin -> Stores -> Configuration -> Catalog -> Catalog -> Search Engine Optimization - > "Use Categories Path for Product URLs" set to "Yes"
B. It is not possible to display Categories name on product url
C. $product->setCategoryId($categoryId)->getProductUrl();
D. You Can Build category URL path \vendor\magento\module-catalog-url- rewrite\Model \CategoryUrlPathGenerator.php
You are building a report using complex SQL aggregations to locate the required data.
In what type of class do you put these SQL statements?
A. Resource model
B. Repository
C. Model
D. Helper