Exam4Training

Adobe AD0-E717 Adobe Commerce Developer Professional Online Training

Question #1

How should a developer display a custom attribute on the category edit page in the admin panel when a new module Vendor.Category is created?

  • A . Create view/adminhtml/layout/catalog_category_edit xml in the module, and then define a block that would display the field for the attribute.
  • B . The field for the attribute will appear automatically.
  • C . Create view/adminhtml/ui_component/category_form.xml file in the module, and then define the field for the attribute.

Reveal Solution Hide Solution

Correct Answer: C
C

Explanation:

By creating a category_form.xml file in the view/adminhtml/ui_component directory, you can define fields using the UI Component mechanism. Once you specify the custom attribute in this XML, it will appear in the category edit form in the admin panel.

Question #2

How should a grid or form be included in an admin page layout using the Ul Component?

  • A . <referenceContainername=’content"> q <uiComponentname="example_listing.xml7> </referenceContainer>
  • B . <referenceContainername=’contenf> q <uiComponent name="example_listing7> </referenceContainer>
  • C . <referenceContainername=’content"> <uiComponentname="Vendor_Module::ul_component/example_listing.xml7> </referenceContainer>

Reveal Solution Hide Solution

Correct Answer: B
B

Explanation:

To include a grid or form in an admin page layout using the UI Component, you’d typically use the <uiComponent /> tag inside a <referenceContainer /> tag, specifying the name of the UI Component (not the full path to the XML file).

Question #3

Which action, if any, should be taken to forbid Adobe Commerce Admin from performing specific actions?

  • A . Create a new user role with custom-defined resources, and assign it to the admin user
  • B . This action cannot be taken since all admin users must have full access.
  • C . Enable custom roles in the store configuration, and assign admin user ID(s).

Reveal Solution Hide Solution

Correct Answer: A
A

Explanation:

To forbid Adobe Commerce Admin from performing specific actions, a developer should create a new user role with custom-defined resources, and assign it to the admin user. This can be done by going to System > Permissions > Roles and creating a new role. In the Resources section, the developer can select the specific resources that they want to restrict the admin user from accessing.

Question #4

Which file should a developer use to set the default value when creating configuration fields for admin?

  • A . etc/adminhtml/config.xml
  • B . etc/config xml
  • C . etc/adminhtml/system.xml

Reveal Solution Hide Solution

Correct Answer: A
A

Explanation:

When creating configuration fields for the admin in Magento 2, the default values are set in: etc/adminhtml/config.xml

Question #5

How can a developer prioritize a plugin’s execution, if possible?

  • A . The developer can use sortOrder property by specifying a lower value than the target plugin.
  • B . The developer can use sortOrder property by specifying a higher value than the target plugin.
  • C . This cannot be achieved as the plugins are always executed by their module’s load order in app/etc/config.php file.

Reveal Solution Hide Solution

Correct Answer: A
A

Explanation:

In Magento 2, when multiple plugins are created for the same method, the sortOrder property is used to determine the order in which they are executed. In Magento 2, when multiple plugins are created for the same method, the sortOrder property is used to determine the order in which they are executed.

Question #6

In which two directories are third-party modules located by default? (Choose two.)

  • A . vendor/
  • B . app/packages/
  • C . app/modules/
  • D . app/code/

Reveal Solution Hide Solution

Correct Answer: A, D
A, D

Explanation:

By default, third-party modules are located in vendor/ or app/code/ directories. The vendor/ directory contains modules that are installed using Composer, while the app/code/ directory contains modules that are manually copied or cloned from a repository.

Question #7

What does a URL Rewrite do?

  • A . It updates the URL that is stored on the server.
  • B . It changes the way a URL appears in the browser
  • C . It updates the URL to a domain that is not being Indexed.

Reveal Solution Hide Solution

Correct Answer: B
B

Explanation:

A URL rewrite changes the way a URL appears in the browser. For example, a URL rewrite could be

used to change the URL for a product from /product/1234 to /product/my-product.

Question #8

Which file is used to add a custom router class to the list of routers?

  • A . routes.xml
  • B . di.xml
  • C . config.xml

Reveal Solution Hide Solution

Correct Answer: A
A

Explanation:

The routes.xml file is used to define the list of routers for Adobe Commerce. A custom router class can be added to the list of routers by adding a new entry to the routes.xml file.

Question #9

A developer found a bug inside a private method of a third party module class.

How can the developer override the method?

  • A . Create a custom class with corrected logic, and define the class as preference in the preferences.xml.
  • B . Create a custom class with the corrected logic, and define the class as a preference for original one in the di xml.
  • C . Create a plugin, implement correct logic in the after" method, and then define the plugin in the di.xml.

Reveal Solution Hide Solution

Correct Answer: B
B

Explanation:

When dealing with a bug inside a private method of a third-party module class in Magento 2, the problem arises that private methods cannot be accessed via plugins. When dealing with a bug inside a private method of a third-party module class in Magento 2, the problem arises that private methods cannot be accessed via plugins.

Question #10

Which property allows multiple cron jobs to share the same configuration?

  • A . name
  • B . group
  • C . schedule

Reveal Solution Hide Solution

Correct Answer: B
B

Explanation:

The group property allows multiple cron jobs to share the same configuration. The group property defines the name of the cron group that the cron job belongs to. A cron group can have common settings such as schedule, status, and error email recipients.

Configure a custom cron job and cron group (tutorial) | Adobe Commerce

Question #11

Which command invalidates the index?

  • A . bin/magento indexerreindex <index_name>
  • B . bin/magento indexer:reset <index_name>
  • C . bin/magento Indexerinvalldate <lndex_name>

Reveal Solution Hide Solution

Correct Answer: B
B

Explanation:

The command bin/magento indexer:reset <index_name> sets the status of the specified index to “Invalid”. This means that the index needs to be updated before it can be used by Magento1.

Question #12

Which index mode is valid?

  • A . Update on refresh
  • B . Update on invalidate
  • C . Update on save

Reveal Solution Hide Solution

Correct Answer: A
A

Explanation:

When you make a change, the change is not reflected immediately. Instead, the indexer is marked as "Reindex required," and you have to run the indexer manually (or via a scheduled process) to see the changes.

Question #13

Which command should be used to refresh the cache using the command line?

  • A . magentocacheclean<type>
  • B . magentocacherefresh<type>
  • C . magentocachedelete<type>

Reveal Solution Hide Solution

Correct Answer: B
B

Explanation:

The command magentocacherefresh<type> clears and regenerates a specific cache type1. This is different from magentocacheclean<type>, which only clears a specific cache type without regenerating it, and magentocachedelete<type>, which deletes a specific cache type from the file system1.

Question #14

Which has its own root category?

  • A . Websites
  • B . Stores
  • C . Store Views

Reveal Solution Hide Solution

Correct Answer: B
B

Explanation:

In Magento, each store has its own root category, which defines the main category structure for that store1. Websites and store views do not have their own root categories, but they can share or inherit the root category of a store1.

Question #15

A merchant has noticed an error in the checkout. The accessed URL is /checkout.

Where can the developer find the responsible controller in the Magento.Checkout module?

  • A . Controller/lndex/lndex.php
  • B . Controller/lndex/Checkout.php
  • C . Controller/Checkout/lndex.php

Reveal Solution Hide Solution

Correct Answer: A
A

Explanation:

In Magento 2, when you access a URL like /module, the system internally maps it to the default action of the default controller (which is Index) of that module. Hence, for the /checkout URL, the Magento. Checkout module would use the Index action of the Index controller.

Question #16

What is the default store ID for the admin panel?

  • A . 0
  • B . 1
  • C . -1

Reveal Solution Hide Solution

Correct Answer: C
Question #17

A developer is creating a class VendorModuleModelMyModeL How should that class be defined as transient in di.xml?

  • A . <type name="VendorModuleModelMyModer transient="true7>
  • B . <type name="VendorModuleModelMyModer singleton=’false7>
  • C . <type name=’VendorModuleModelMyModer shared="false7>

Reveal Solution Hide Solution

Correct Answer: C
C

Explanation:

In Magento 2’s di.xml, if you want to define a class as transient (meaning a new instance is created every time it’s requested), you would use the shared attribute and set it to false.

This definition ensures that a new instance of MyModel is created every time it’s requested from the object manager.

Question #18

Under which section should the soft dependency for a module be listed in app/code/<Vendor>/<Module>/composer.json file?

  • A . suggest*: {
  • B . }
    optional": {
  • C . }
    soft": {
  • D . }

Reveal Solution Hide Solution

Correct Answer: A
A

Explanation:

In the composer.json file, soft dependencies (those that are not required for a module to function but might enhance or alter its behavior if present) are typically listed under the suggest section.

This is the correct section in composer.json to list soft dependencies. Packages listed here suggest that they complement the main package, but they are not strictly required.

Question #19

How can a developer override a core class method in Adobe Commerce?

  • A . <preference for=’MagentoCatalogBlockProduct" type="VendorModuleBlockProducf />
  • B . <typename="MagentoCatalogBlockProduct"> q <rewrite
    class="VendorModuleBlockProducf /> </type>
  • C . <typename="MagentoCatalogBlockProduct*> <arguments> q <argument name="rewrtte"
    xsi:type="object">VendorModuleBlockProduct</argument> </arguments> </type>

Reveal Solution Hide Solution

Correct Answer: A
A

Explanation:

The preference element in di.xml allows specifying a custom class that will be used instead of the original class when creating an object1. This can be used to override a core class method by extending the original class and overriding the method in the custom class1. The rewrite and argument elements are not valid for overriding core class methods in di.xml1.

Question #20

Which command can be used to display a full list of enabled and disabled Magento modules?

  • A . bin/magento module:all
  • B . bin/magento modulestatus
  • C . bin/magento module:show

Reveal Solution Hide Solution

Correct Answer: B
B

Explanation:

The command bin/magento modulestatus displays the status of all modules, including enabled and disabled ones1. The command bin/magento module: all is not valid, and the command bin/magento module: show displays information about a specific module1.

Question #21

Which Adobe Commerce table stores all cron data?

  • A . schedule
  • B . cronjob
  • C . cron_schedule

Reveal Solution Hide Solution

Correct Answer: C
C

Explanation:

The cron_schedule table stores all cron data in Adobe Commerce. It contains information about the cron jobs that are scheduled to run, as well as the time and date they are scheduled to run.

Question #22

Which method type can be intercepted by plugins?

  • A . final
  • B . static
  • C . public

Reveal Solution Hide Solution

Correct Answer: C
C

Explanation:

Only public methods can be intercepted by plugins. This is because plugins are essentially extensions of Magento classes, and they can only modify the behavior of public methods.

Question #23

Which two actions will the developer need to take to translate strings added in JS files? (Choose two.)

  • A . define ([
    ‘jquery,
    ‘mage/translate’
    ), function ($, $t) {.„»;
  • B . $ trans( ,<string>’)
  • C . $.mage._(‘<string>);
  • D . translate(‘<string>’);

Reveal Solution Hide Solution

Correct Answer: A, C
A, C

Explanation:

To translate strings added in JS files, the developer needs to do the following:

Import the mage/translate module.

Use the translate() function to translate the string.

Question #24

Which Magento project directory is the recommended webroot for the web server?

  • A . Pub/
  • B . app/
  • C . bin/

Reveal Solution Hide Solution

Correct Answer: A
A

Explanation:

The Pub/ directory is the recommended webroot for the web server in Magento. This is because it contains all of the static content that is used by the Magento store, such as images, CSS, and JavaScript files.

Question #25

Which CLI command should be used to determine that static content signing is enabled?

  • A . bin/magento config:show dev/static/status
  • B . bin/magento config:show dev/static/sign
  • C . bin/magento config:show dev/static/sign/status

Reveal Solution Hide Solution

Correct Answer: B
B

Explanation:

To determine if static content signing is enabled via the CLI in Magento 2, you would use the config:show command followed by the configuration path for static content signing.

The correct configuration path for static content signing is dev/static/sign.

Exit mobile version