ExamGecko
Home Home / Adobe / AD0-E711

Adobe AD0-E711 Practice Test - Questions Answers, Page 2

Question list
Search
Search

Which index mode is valid?

A.
Update on refresh
A.
Update on refresh
Answers
B.
Update on Invalidate
B.
Update on Invalidate
Answers
C.
Update on save
C.
Update on save
Answers
Suggested answer: C

Explanation:

In Magento, the "Update on save" index mode is valid. This mode automatically updates the index whenever the data is saved. The other options, "Update on refresh" and "Update on Invalidate," do not exist in Magento.

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

A.
bin/magento config:show dev/static/status
A.
bin/magento config:show dev/static/status
Answers
B.
bin/magento config:show dev/static/sign
B.
bin/magento config:show dev/static/sign
Answers
C.
bin/magento config;show dev/static/sign/status
C.
bin/magento config;show dev/static/sign/status
Answers
Suggested answer: B

Explanation:

The correct CLI command to determine if static content signing is enabled in Magento is "bin/magento config:show dev/static/sign". This command will display the current status of the static content signing configuration.

Which tag should be used in module.xml to ensure dependency modules are loaded in the proper order?

A.
<sequence></sequence>
A.
<sequence></sequence>
Answers
B.
<flow></flow>
B.
<flow></flow>
Answers
C.
<order></order>
C.
<order></order>
Answers
Suggested answer: A

Explanation:

In Magento's module.xml file, the <sequence></sequence> tag should be used to ensure that dependency modules are loaded in the proper order. This tag defines the load order of modules, making sure that dependent modules are loaded before the current module.

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

A.
$.trans( '<string>')
A.
$.trans( '<string>')
Answers
B.
$.image._C<string>');
B.
$.image._C<string>');
Answers
C.
translate('<string>'); define (( 'jquery1,
C.
translate('<string>'); define (( 'jquery1,
Answers
D.
'mage/Translate' 1, function ($, $t) {...});
D.
'mage/Translate' 1, function ($, $t) {...});
Answers
Suggested answer: A, D

Explanation:

To translate strings added in JS files in Magento, you should use the following two actions:

1. $.trans('<string>') - This function is a shorthand for translating strings in JavaScript.

2. 'mage/Translate', function ($, $t) {...} - This method is used to include the Magento translation component in your JavaScript and then use the $t function to translate strings.

A developer has been tasked to create a new controller for custom functionality. Only GET HTTPrequests must be allowed. What must be done so the controller processes only GET requests?

A.
Use the REQUEST class constant to specify the request.
A.
Use the REQUEST class constant to specify the request.
Answers
B.
Ensure the controller class Implements Magento\Framework\App\Action\HttpGetActionlnterface.
B.
Ensure the controller class Implements Magento\Framework\App\Action\HttpGetActionlnterface.
Answers
C.
Ensure the controller extends the Magento\Framework\App\Action\AbstractGetController.
C.
Ensure the controller extends the Magento\Framework\App\Action\AbstractGetController.
Answers
Suggested answer: B

Explanation:

To make sure the controller processes only GET requests in Magento, you must ensure that the controller class implements the Magento\Framework\App\Action\HttpGetActionInterface. This interface enforces that the controller only processes GET requests, rejecting any other HTTP request methods.

How can a developer turn off all store view options and scope indicators for a single-store installation?

A.
Remove all websites, stores, and store views.
A.
Remove all websites, stores, and store views.
Answers
B.
Change the application mode to ''production".
B.
Change the application mode to ''production".
Answers
C.
Set the 'Enable Single-Store Mode' configuration setting to "Yes".
C.
Set the 'Enable Single-Store Mode' configuration setting to "Yes".
Answers
Suggested answer: C

Explanation:

To turn off all store view options and scope indicators for a single-store installation, one can enable the Single-Store Mode by navigating to Stores > Configuration > General > Single-Store Mode in the Magento Admin Panel and selecting "Yes." This will remove all website, store, and store view scopes from the Magento instance and make it work as if there is only one store. Reference: -

https://docs.magento.com/user-guide/stores/single-store-mode.html

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 the corrected logic, and define the class as a preference for original one in the di.xml
A.
Create a custom class with the corrected logic, and define the class as a preference for original one in the di.xml
Answers
B.
Create a custom class with corrected logic, and define the class as preference in the preferences.xml.
B.
Create a custom class with corrected logic, and define the class as preference in the preferences.xml.
Answers
C.
Create a plugin, implement correct logic in the 'after' method, and then define the plugin in the di.xml.
C.
Create a plugin, implement correct logic in the 'after' method, and then define the plugin in the di.xml.
Answers
Suggested answer: A

Explanation:

To override a private method of a third-party module class, we need to create our own custom class with correct logic (overridden method) having same name & signature of target method, creating Preference configuration through di.xml that references our new class instead of original one.

Reference: - https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/di-xmlfile.html#preference-example - https://www.integer-net.com/magento2-overriding-privatemethods/

Which CLI command is used to clear caches?

A.
bin/magento cache:remove
A.
bin/magento cache:remove
Answers
B.
bin/magento cache:reset
B.
bin/magento cache:reset
Answers
C.
bin/magento cache:flush
C.
bin/magento cache:flush
Answers
Suggested answer: C

Explanation:

The `cache:flush` CLI command is used to clear all cached data including configuration files cache storage, block_html cached pages etc. Reference: -

https://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommandscache.html#config-cli-subcommands-cache-flush

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

A.
config.xml
A.
config.xml
Answers
B.
routes.xml
B.
routes.xml
Answers
C.
dl.xml
C.
dl.xml
Answers
Suggested answer: B

Explanation:

In Magento's routing process configured area routers takes precedence over global router configurations defined in config.xml . So , One can add a custom router class definition inside routes.xml like this : ``` ="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd"> <router id="[ROUTER_ID]"> <route frontName="[FRONT_NAME]"> <module name="[MODULE_NAME]" before="[OTHER_ROUTE_OR_MODULE]"/> </route> </router> </config> ``` Reference :

https://devdocs.magento.com/guides/v2.4/extension-dev-guide/routing.html#cusroute_def

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

A.
pub/
A.
pub/
Answers
B.
app/
B.
app/
Answers
C.
bin/
C.
bin/
Answers
Suggested answer: A

Explanation:

Magento’s optimized web directory is the `pub` directory, which makes direct access to sensitive areas of your application such as logs and cache harder. Reference: -

https://magento.stackexchange.com/questions/95832/magento-2-best-root-directory-for-securityreasons

- https://devdocs.magento.com/guides/v2.4/install-gde/prereq/apache-tutorial-filesystem.html#apache-mode-split

Total 60 questions
Go to page: of 6