Pass the Adobe Adobe Commerce AD0-E716 Questions and answers with CertsForce

Viewing page 1 out of 2 pages
Viewing questions 1-10 out of questions
Questions # 1:

An Adobe Commerce developer is creating a module (Vendor.ModuleName) to be sold on the Marketplace. The new module creates a database table using declarative schema and now the developer needs to make sure the table is removed when the module is disabled.

What must the developer do to accomplish this?

Options:

A.

There is nothing further the developer needs to do. The table will be removed when the module is disabled and bin/magento setup:upgrade is run.


B.

There is nothing further the developer needs to do. The table will be removed when the when bin/magento module:uninstall vendor_ModuleName is run.


C.

Add a schema patch that implements Magento\Framework\setup\Patch\PatchRevertabieinterface and drops the table in the revert function.


Questions # 2:

An Adobe Commerce developer wants to generate a list of products using ProductRepositorylnterf ace and search for products using a supplier_id filter for data that is stored in a standalone table (i.e., not in an EAV attribute).

Keeping maintainability in mind, how can the developer add the supplier ID to the search?

Options:

A.

Write a before plugin on \Hagento\catalogVtodel\ProductRepository: :geti_ist() and register the search criteria passed. Write an event observer to 0 listen for the event cataiog_product_coiiection_ioad_before. Iterate through the registered search criteria, and if found, apply the needed join and filter to the events scollection.


B.

Add a CUStOm filter to the Virtual type "agento\Catalog\Model\Api\SearchCriteria\CollectionProcessor\ProductFilterProce5sor for supplier_id field. In

the custom filter, apply the needed join and filter to the passed $collection.


C.

Write a before plugin On \Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface: :process(). Iterate through the $searchCriteria

provided for supplier_id, and if found, apply the needed join and filter to the passed scollection.


Questions # 3:

An Adobe Commerce developer is creating a new module to extend the functionality of the cart. The module is installed in app/code/CompanyName/ModuleName/.

How would an Adobe Commerce developer extend the existing CartltemPrices GraphQL schema to include a custom base_price field?

Options:

A.

Create and Configure a for Hagento\QuoteGraphQl\Model\Resolver\CartItemPrices that adds the base_price field in the resolve() function.


B.

Add the following to the module's etc/schema.graphqis file:

3

C)

Add the following to the module's etc/graphqi/di.xmi file:

3


C.

Option A


D.

Option B


E.

Option C


Questions # 4:

An Adobe Commerce developer is writing an integration test. They checked some Integration Tests for Magento core modules for reference and noticed that they use data fixtures initialized by adding annotations to test classes. For example:

Question # 4

The developer wants to add their own fixture to test a MyVendor_MyModule they created. Which steps will make this possible?

Options:

A.

1. Create a PHP file with the fixture data inside their own module in [module dir]/Test/integration/_fiies/my_fixture.php.

2. Add the following annotation to the test method:

AD0-E716 Question 4 Option 1


B.

1. Create a PHP file With the fixture data in [magento root dir]/dev/tests/integration/testsuite/MyVendor/MyModule/_files/my_fixture.php.

2. Add the following annotation to the test method:

4


C.

1. Create a PHP file with the fixture data inside their own module in [module dir]/Test/integration/_f iies/my_f ixture.php.

2. Add the following annotation to the test method:

4


D.

Option A


E.

Option B


F.

Option C


Questions # 5:

An Adobe Commerce developer has added an iframe and included a JavaScript library from an external domain to the website. After that, they found the following error in the console:

Refused to frame [URL] because it violates the Content Security Policy directive.

In order to fix this error, what would be the correct policy ids to add to the csp_whitelist.xml file?

Options:

A.

frame-src and script-src


B.

default-src and object-src


C.

frame-ancestors and connect-src


Questions # 6:

An Adobe Commerce developer is trying to create a custom table using declarative schema, but is unable to do so.

Question # 6

What are two errors in the snippet above? (Choose two.)

Options:

A.

Column (roll_no) does not have index. It is needed since attribute identity is set to true.


B.

Column (entity_id) does not have index. It is needed since attribute identity is set to false.


C.

Column (student_name) does not have attribute length.


D.

null is not a valid value for column (roll_no).


Questions # 7:

On an Adobe Commerce Cloud platform, at what level is the variable env: composer_auth located in the Project Web Interface?

Options:

A.

In the Environment-specific variables.


B.

In the Integration variables.


C.

In the Project variables.


Questions # 8:

An Adobe Commerce developer is working on a module to manage custom brand entities and wants to replicate the following SQL query using SearchCriteria:

A)

Question # 8

B)

Question # 8

C)

Question # 8

Options:

A.

Option A


B.

Option B


C.

Option C


Questions # 9:

An Adobe Commerce developer is tasked to add a file field to a custom form in the administration panel, the field must accept only .PDF files with size less or equal than 2 MB. So far the developer has added the following code within the form component xml file, inside the fieldset node:

Question # 9

How would the developer implement the validations?

A)

Add the Validations Within the HyVendor\MyModule\Controller\Adminhtml\CustomEntity\UploadPdf Controller

Question # 9

B)

Add a virtual type forMyvendor\MyModuie\Modei\customPdfupioader specifying the aiiowedExtensions and the maxFiiesize for the constructor, within the module's di.xmi:

Question # 9

C)

Add the following code inside the node:

Question # 9

Options:

A.

Option A


B.

Option B


C.

Option C


Questions # 10:

An Adobe Commerce developer was asked to provide additional information on a quote. When getting several quotes, the extension attributes are returned, however, when getting a single quote it fails to be returned.

What is one reason the extension attributes are missing?

Options:

A.

The developer neglected to add coiiection="trueM to their attribute in etc/extension_attributes.xmi file.

ottribute code="my_attributesM type="MyVendor\MyModule\Api\Data\^AttributeInterface[]M collection="true" />


B.

The developer neglected to provide a plugin On Hagento\Quote\Api\CartRepositoryInterface: :get.


C.

The developer neglected to implement an observer on the coiiection_ioad_after event.


Viewing page 1 out of 2 pages
Viewing questions 1-10 out of questions