Free Adobe AD0-E725 Exam Questions (page: 2)

An Adobe Commerce Developer is tasked with configuring a custom module to allow for different behaviors of a core class without altering the original class code.

How should the Developer achieve this flexibility by leveraging Magento's dependency injection system?

  1. Use virtual types in the di.xml file.
  2. Use a transient object in the di.xml file.
  3. Use constructor arguments in the di.xml file.

Answer(s): A



A Developer is working on an Adobe Commerce store, and the security team has flagged certain inline scripts in the store as vulnerable to potential attacks. The Developer decides to implement Content Security Policies (CSP) to secure the store's environment.

What will the Developer achieve by taking this action?

  1. Ensure that all user input is sanitized before being processed by the application.
  2. Prevent users from accessing certain areas of the website based on their IP address.
  3. Restrict which resources (scripts, styles, images) are allowed to load on the website.

Answer(s): C



An Adobe Commerce Developer creates a before plugin for the save() method from the Magento\Framework\App\Cache\Proxy class to manipulate with cache identifiers and data before it is saved to the cache storage. An example of the code is shown below:

namespace Magento\Framework\App\Cache;

use Magento\Framework\App\Cache\CacheInterface;

use Magento\Framework\ObjectManager\NoninterceptableInterface;

class Proxy implements

CacheInterface,

NoninterceptableInterface

{

...

public function save($data, $identifier, $tags = [], $lifeTime = null)

{

return $this->getCache()->save($data, $identifier, $tags, $lifeTime);

}

...

}

Why is the plugin not working as expected?

  1. The plugin cannot be created for this class.
  2. An after plugin defined for the same function affects the results.
  3. An around plugin defined for the same function prevents the execution.

Answer(s): A



A Developer needs to subscribe to the customer_register_success event.

How should the observer be declared in the module?

  1. Declare in etc/events.xml:
    <event name="customer_register_success">
    <observer name="vendor_module_customer_register_observer" instance="Vendor\Module\Observer\CustomerRegisterSuccess" /> </event>
  2. Declare in etc/events.xml:
    <observer name="customer_register_success">
    <event name="vendor_module_customer_register_observer" instance="Vendor\Module\Observer\CustomerRegisterSuccess" /> </observer>
  3. Declare in etc/observer.xml:
    <observer name="vendor_module_customer_register_observer"> <event name="customer_register_success"
    instance="Vendor\Module\Observer\CustomerRegisterSuccess" /> </observer>

Answer(s): A



A Developer creates daily cron jobs to automate a client's business processes, including automated stock imports via CSV files once per day. After a few days, it is noted that the cron jobs do not run daily. The Developer discovers the cron jobs are sometimes assigned a `missed' status and do not execute, and other cron jobs become stuck during the execution time of the custom cron jobs.

Which option should the Developer use to ensure the cron jobs consistently run each day?

  1. Implement a custom group for the cron jobs in the crontab.xml.
  2. Set the cron jobs to run multiple times per day instead of once daily.
  3. In the execute() function, implement a lock checker to make sure the cron runs alone.

Answer(s): A



A new critical security vulnerability is found on Adobe Commerce Cloud. The successful exploitation may lead to arbitrary code execution, so the Developer must apply a security patch file given by Adobe as soon as possible to ensure system security.

How should the Developer apply the security patch on Adobe Commerce hosted on cloud infrastructure according to best practices?

  1. Apply a security patch using composer.json
  2. Copy a security patch to m2-hotfixes directory
  3. Upgrade Adobe Commerce to the latest security patch release

Answer(s): B



An Adobe Commerce Developer is approached to disable several cron jobs from a customization completed by a third-party agency. The cron jobs will eventually be enabled again once a code review of the cron jobs is complete.

Using best principles, how should the Developer action this request?

  1. Add the schedule="* * * * *" to the <job> node in the crontab.xml file.
  2. Edit the schedule with a date which will never happen in the crontab.xml file.
  3. Add the disabled="true" to the <job> node in the crontab.xml file.

Answer(s): B



An Adobe Commerce Developer is tasked with adding a custom tax calculation to the checkout process. In addition to core tax calculations, a legacy code extending core tax calculation classes is also found. The Developer wants to utilize Magento's dependency injection system effectively to meet requirements, ensuring the solution works without modifying the existing core and legacy classes.

What should the Developer implement to achieve this?

  1. Constructor arguments
  2. Virtual types
  3. Preferences

Answer(s): B






Post your Comments and Discuss Adobe AD0-E725 exam prep with other Community members:

AD0-E725 Exam Discussions & Posts