Summer Certification Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code = getmirror

Pass the Magento Certified Developer Magento-2-Certified-Associate-Developer Questions and answers with ExamsMirror

Practice at least 50% of the questions to maximize your chances of passing.
Exam Magento-2-Certified-Associate-Developer Premium Access

View all detail and faqs for the Magento-2-Certified-Associate-Developer exam


792 Students Passed

86% Average Score

97% Same Questions
Viewing page 3 out of 3 pages
Viewing questions 21-30 out of questions
Questions # 21:

Your module, MyCompany_MyModule, is using the frontName mymodule. You need to locate the class responsible for the frontend path /mymodule/custom.

What file contains the controller class for the frontend path /mymodule/custom?

Options:

A.

Controller/Custom/Index.php

B.

Controller/Custom.php

C.

Controller/MyModule/Custom/Index.php

D.

Controller/Frontend/MyModule/Custom.php

Questions # 22:

How do you add a foreign key to an existing table created by another module?

Options:

A.

Create etc/db_schema.xml file with the table node and constraint child node

B.

Run the command bin/magento setup:db-schema:upgrade <title>

C.

This can only be done with raw SQL in a Schema Patch file

D.

Create the etc/db_constraints.xml file and specify foreign key there in the constraint node

Questions # 23:

You are developing a module MyCompany_StoreInfo to display information about brick and mortar stores on a frontend page. The displayed information varies based on the country of a given store.

What two elements automatically render their children? (Choose two.)

Options:

A.

B.

C.

D.

Questions # 24:

Which two ways does Magento persist category relationships in the database? (Choose two.)

Options:

A.

Using slash-separated values in the path field

B.

in the table catalog_category_index

C.

in the parent_id field

D.

Using comma-separated values in the parent-ids field

Questions # 25:

You are implementing a before plugin in MyCompany_Magic. It will intercept the same method that MyCompany_Admission is already intercepting using a before plugin: Topmenu::getBlockHtml

Which two actions are required to ensure the new plugin will execute last? (Choose two.)

Options:

A.

Include a sortOrder=”20” on the new plugin in MyCompany_Magic’s etc/di.xml file

B.

Configure plugin sequencing for both plugins in MyCompany_Magic’s etc/plugin_sequence.xml file

C.

Set a sortOrder=”10” for MyCompany_Admission’s plugin in MyCompany_Magic’s etc/di.xml

D.

Add MyCompany_Admission as a dependency in MyCompany_Magic’s etc/module.xml file

Questions # 26:

You have created a custom module which must perform an action immediately after an order is placed, but only on the store front of the merchant site. You have selected the checkout_submit_all_after as the target event which the module will observe.

In which file will the event observer be declared?

Options:

A.

etc/frontend.xml

B.

etc/events.xml

C.

etc/config.xml

D.

etc/frontend/events.xml

Questions # 27:

Where do you change the frontName for the admin router?

Options:

A.

app/etc/config.xml

B.

app/etc/env.php

C.

app/etc/local.xml

D.

composer.json

Questions # 28:

What is the connection between product attribute sets and categories?

Options:

A.

Categories have no connection to product attribute sets, and any product can be assigned to any category

B.

Each category is linked to a single product attribute set, and only products from that attribute set are allowed in the category

C.

Each category is linked to a single product attribute set, and only products from that category’s set or any of its parent categories’

D.

Categories can be connected to multiple product attribute sets, and only products from one of those sets are allowed in the category

Questions # 29:

You have created a module controller that responds to the following URL: /mycompany/product/load/id/123.

Which two methods will load the product model by ID as specified in the URL? (Choose two.)

Options:

A.

\Magento\Catalog\Model\ResourceModel\Product::load($productModel, $id)

B.

\Magento\Catalog\Model\ResourceModel\Product\Collection::load()->fetchById($id)

C.

\Magento\Catalog\Model\ResourceModel\Product\Collection::fetchItemById($id)

D.

\Magento\Catalog\Api\ProductRepositoryInterface::getById($id)

Questions # 30:

In a code review of a merchant’s site you have discovered that there are multiple observers for the checkout_submit_all_after event. After closer inspection, you notice one of these observers is relying on the others being executed before it is called.

What risk does this pose, and how can it be mitigated?

Options:

A.

There is no risk posed as long as each event observer specifies a correct sortOrder. Nothing needs to be changed.

B.

Event observers are fired in alphabetical order of the observer name. There is no risk here.

C.

Magento only supports one observer per event. These observers will need to be combined into a single point of customization.

D.

Order of listener execution cannot be guaranteed, resulting in a fragile implementation. This code should be re-worked using plugins

Viewing page 3 out of 3 pages
Viewing questions 21-30 out of questions
TOP CODES

TOP CODES

Top selling exam codes in the certification world, popular, in demand and updated to help you pass on the first try.