A merchant requires the ability to configure contact information for their brick and mortar stores as a CSV file upload. The module already exists and contains an etc/adminhtml/system.xml file where the new field can be added.
How do you specify the class that will process the uploaded file?
A. <upload_model>\Magento\Config\Model\Config\Upload\File</upload_model>
B. <backend_model>\Magento\Config\Model\Config\Backend\File</backend_model>
C. <source_model>\Magento\Config\Model\Config\Source\File</source_model>
D. <frontend_model>\Magento\Config\Model\Config\Frontend\File</frontend_model>
正解:B
質問 2:
A module you are working on needs to send a newsletter to all subscribed customers at predefined intervals.
Which two actions do you take to make sure the newsletter is sent? (Choose two.)
A. Implement \MyCompany\MyModule\Cron\NewsLetterSender::execute and register it in etc/crontab/di.xml
B. Make sure bin/magento cron:run is added to the system crontab
C. Implement \MyCompany\MyModule\Cron\NewsLetterSender::execute and register it in etc/crontab/.xml
D. Register the plugin for \Magento\Customer\Model\Customer::authenticate in etc/crontab.xml
正解:B,C
質問 3:
You are implementing a custom module MyModule, which provides an implementation of
\Psr\Log\LoggerInterface called \MyCompany\MyModule\Logger.
The LoggerInterface has the default preference declared in app/etc/di.xml.
Keeping upgradability in mind, how do you make \MyCompany\MyModule\Logger the default implementation of the LoggerInterface globally?
A. Overwrite the existing preference for the LoggerInterface in app/etc/di.xml
B. Declare a new preference for the LoggerInterface in
app/code/MyCompany/MyModule/etc/global/di.xml
C. Declare a new preference for the LoggerInterface in MyCompany/MyModule/etc/di.xml
D. Declare a new preference for the LoggerInterface in
app/code/myCompany/MyModule/etc/frontend/di.xml
正解:C
質問 4:
Which two tasks are supported by Magento CLI? (Choose two.)
A. Customer password reset
B. Codebase deployment from developer machine to staging server
C. Clearing cache
D. Administrator account creation
正解:C,D
質問 5:
You have to install a new module on the production environment. All the module is adding a new product attribute. You enabled maintenance mode, copied the module code, run bin/magento setup:upgrade and disabled maintenance mode.
What two risks does this process pose? (Choose two.)
A. It will clean static assets from the pub/static folder
B. It will void all active sessions
C. The new attribute will be invisible on the storefront until the cache is cleaned manually
D. It will clean all caches which will cause a performance degradation
正解:B,C
質問 6:
A merchant asks you to extend customer functionality to allow customer accounts to be associated with two or more billing addresses.
How is this implemented?
A. By altering the customer_entity table, adding the field billing_address2, and customizing both My Account and Checkout functionality to use that new field
B. By adding the attribute like customer_address_billing2 and customizing both My Account and Checkout functionality to use that new attribute
C. By changing the System Configuration setting: Customer>Allow multiple billing addresses to Yes
D. This is out-of-the box functionality
正解:D
質問 7:
You are working on a new entity called vendor. You implemented the model, resource model and collection.
You want to ensure that standard model events will be fired for your model, so an observer can be created for the events vendor_save_after, vendor_save_commit_after and others.
How do you do that?
A. Create an entry in etc/di.xml and add the argument eventPrefix with the value of vendor
B. You must implement all appropriate methods and fire the events manually
C. Declare the $_eventPrefix property in your vendor model and set it to vendor
D. Ensure that the primary key in the corresponding table is named vendor_id
正解:C
質問 8:
Which method of a Magento resource model will remove a record from the database?
A. delete
B. erase
C. remove
D. clean
正解:A
Ishii -
なかなかMagento-2-Associate-Developer試験でいい点は取れると思う。解釈でわかりやく内容を明示。つまづきやすいポイントをフォローしてくれてる。