AD0-E709 Adobe Commerce Developer Expert

Loading demo links...

Showing 1–3 of 10 questions

Question 1

Which two techniques can be used to protect a storefront POST action against Cross Site Request Forgery (CSRF) attacks? (Choose two.)

Select all that apply, then click Submit answer.

  • The form sending data to that action needs to include a fornjtey parameter with a valid form key and the action must instantiate \Manento\Framwork\Data\ForumKey\Formkey\Validator validate it.

  • The action needs to implement \Mgento\Framework\App\CSrfAwareActioninterface and include the validateForCsrf method implementing the actual protection logic.

  • The form sending data to that action needs to include a form_key parameter with a valid form key which will automatically be used in a built-in CSRF validation.

  • The action needs to implement \Magento\Framework\App\ActionvHttpPosTActioninterface to trigger built-in CSRF validation.

Question 2

An Adobe Commerce developer has just finished creating a new custom entity, a block that extends \Mangento\Framework\View|Element\abstractBlock that lists all of the existing entities and a controller with the appropriate handle to display the block.

The developer now wants to implement cache on the block so that when one of the custom entities is saved, the cache of the block is automatically invalidated.

According to best practices- what are the two steps to accomplish this? (Choose two.)

 

Select all that apply, then click Submit answer.

  • 1. Override AbstractBlock: :getCecheKeyInfo and return an array containing the ids of all displayed entities.
    2. Override AbstractBlock: :getCacheTags and return an array containing, for all displayed entities, the value returned by the getcachetag method of the model
     

  • 1. Create an around plugin on the save( ) method of the model of the entity.
    2. Use the cleanCacheByTags( ) method Of \MagentoVFramework\App\Cache\FlushCaehebyTae with a single argument containing the concatenation of a chosen key and the td of the entity.
     

  • 1. Implement \Magento\framework\DataObject\identityInterface on the block that lists the entities.
    2. Implement the getidentitiesO method on the block to return an array containing, for all displayed entities, the value returned by the getidentities() method of the model.
     

  • 1. Implement \magento\Frame\DataObject\identityInterface on the model of the entity.
    2. Implement the getidentities() method to return the concatenation of a chosen key and the id of the entity.

Question 3

An Adobe Commerce Developer is tasked with writing an importer for a custom entity. After the work is complete and deployed, they start receiving complaints from their client that the importer does not work and fails every time they use it.

The developer realizes that the client is importing a file which does not match the format required for the importer to process correctly.

What two features would the developer add to this importer to prevent this? (Choose two.)

Select all that apply, then click Submit answer.

  • Set up an example file and inject it into the ExampleFileProvider .

  • Set up a try/catch in the importer to display a warning the file is not in the correct format.

  • Set up validation by implementing a validateRow method in their importer.

  • Set $needColumnCheck = true; and add column names to the $validColumnNames class properties.