Exam Details

  • Exam Code
    :MAGENTO2-CERTIFIED-ASSOCIATE-DEVELOPER
  • Exam Name
    :Magento 2 Certified Associate Developer
  • Certification
    :Magento Certification
  • Vendor
    :Magento
  • Total Questions
    :103 Q&As
  • Last Updated
    :May 14, 2024

Magento Magento Certification MAGENTO2-CERTIFIED-ASSOCIATE-DEVELOPER Questions & Answers

  • Question 31:

    You have added a new attribute origin of the type varchar to the product entity.

    Which two calls will filter a product collection with origin set to "California"? (Choose two.)

    A. $collection->addFieldToFilter(`origin', "California");

    B. $collection->addAttributeToSelect(`origin', "California");

    C. $collection->joinAttribute(`origin', `catalog_product/origin', `origin', `California");

    D. $collection->addAttributeToFilter(`origin', "California");

  • Question 32:

    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. Declare the $_eventPrefix property in your vendor model and set it to vendor

    C. You must implement all appropriate methods and fire the events manually

    D. Ensure that the primary key in the corresponding table is named vendor_id

  • Question 33:

    You want to remove a column introduced by a third-party extension via declarative schema. How do you do that?

    A. Create the etc/db_schema.xml file and specify disable="true" on the column

    B. Modify the original etc/db_schema.xml file and remove the column from there

    C. Create a SchemaPatch file and remove the column programmatically

    D. Copy the etc/db_schema.xml file into your module and remove the column from your copy

  • Question 34:

    Your module adds a new controller class which will return a JSON response. What will be the return type of the execute method?

    A. You should implement a new API endpoint instead of returning JSON from a controller

    B. The string value of \Zend_Json::encode()

    C. An instance of \Magento\Framework\Controller\Result\Json

    D. No return needed, an object that can be converted to JSON must be set as the Response body

  • Question 35:

    How do you set the custom block MyCompany\MyModule\Block\A as a child for the block named product.info using layout XML?

    A. B. C. D.

  • Question 36:

    You want to declare a block of the type \Magento\Framework\View\Element\Template with a template named view.phtml in the layout XML.

    What is the correct layout declaration for this?

    A. B. C.

    D.

  • Question 37:

    In layout files you can change al element's order on a page. This can be done using one of the following:

    instruction

    before and after element attributes?

    How are two methods different?

    A. They are the same, both provide access to the same functionality

    B. Elements are renamed by default when using the move instruction

    C. The move instruction allows altering an element's parent node

    D. Before and after attributes can only be used with referenceContainer and referenceBlock

  • Question 38:

    How can you render a text on a page using only layout xml?

    A. B.

    C. D.

  • Question 39:

    You need to find all orders in the processing state. You have written the code:

    When you run the code, you get the following exception:

    How do you resolve the exception?

    A. Specify a preference in di.xml to map SearchCriteriaBuilder to SearchCriteriaInterface

    B. Use dependency injection to load an instance of the SearchCriteria class

    C. Change the getList parameter to: $searchCriteriaBuilder->addFilter(`state', `processing')->create()

    D. Clear generated code to get a new version of SearchCriteriaBuilder

  • Question 40:

    The module MyCompany_MyModule provides custom admin interface pages.

    Access to these pages should only be granted to specific users.

    You add the required configuration to the module's acl.xml file, but the setting does not seem to work as expected.

    How do you visually check if Magento evaluates your ACL resource as expected?

    A. Write a plugin for the class \Magento\Framework\Acl\LoaderInterface::populateAcl() and echo out the loaded roles

    B. Inspect the output of the CLI command bin/magento admin:role:resources ?all

    C. In the browser, open the admin User Roles page. Choose a role and inspect the tree of available resources

    D. Inspect the response of a GET request to the webapi endpoint http://example.com/rest/V1/acl/ resources

Tips on How to Prepare for the Exams

Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Magento exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your MAGENTO2-CERTIFIED-ASSOCIATE-DEVELOPER exam preparations and Magento certification application, do not hesitate to visit our Vcedump.com to find your solutions here.