問題1
Your module adds a new controller class which will return a JSON response.
What will be the return type of the execute method?
Your module adds a new controller class which will return a JSON response.
What will be the return type of the execute method?
正確答案: A
問題2
What will be the result of calling the save() method on a collection instance?
What will be the result of calling the save() method on a collection instance?
正確答案: C
問題3
In the module located at app/code/MyCompany/MyModule there is a JS module in the file view/frontend/web/register.js. The Magento base URL is https://magento.host/ and the luma theme with the en_US locate is used.
What is the public URL for this file?
In the module located at app/code/MyCompany/MyModule there is a JS module in the file view/frontend/web/register.js. The Magento base URL is https://magento.host/ and the luma theme with the en_US locate is used.
What is the public URL for this file?
正確答案: B
問題4
You have loaded an instance of Magento\Catalog\Model\Product in the $product variable. You know that the loaded product has the type configurable with four variations. These variations have the prices: $10, $12, $12,
$15.
What will be the result of the $product->getFinalPrice() call?
You have loaded an instance of Magento\Catalog\Model\Product in the $product variable. You know that the loaded product has the type configurable with four variations. These variations have the prices: $10, $12, $12,
$15.
What will be the result of the $product->getFinalPrice() call?
正確答案: C
問題5
A module you are developing requires the addition of new routes that should be accessible in the store front.
Where do you define your module's frontName?
A module you are developing requires the addition of new routes that should be accessible in the store front.
Where do you define your module's frontName?
正確答案: A
問題6
A module MyModule needs to send notifications to customers only when the account was modified from a mobile app using the REST web APIs.
You decided to implement an observer for customer_save_after_data_object event.
In which file do you declare the observer?
A module MyModule needs to send notifications to customers only when the account was modified from a mobile app using the REST web APIs.
You decided to implement an observer for customer_save_after_data_object event.
In which file do you declare the observer?
正確答案: C
問題7
You are developing a module and need to add another column to a table introduced by another module MyCompany_MyModule via db schema.
How do you do that?
You are developing a module and need to add another column to a table introduced by another module MyCompany_MyModule via db schema.
How do you do that?
正確答案: B