ExamGecko
Home Home / Adobe / AD0-E711

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

Question list
Search
Search

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

A.
soft': {} ''optional'':{
A.
soft': {} ''optional'':{
Answers
B.
}''Suggest": {
B.
}''Suggest": {
Answers
C.
}
C.
}
Answers
Suggested answer: B

Explanation:

In a composer.json file, soft dependencies for a module should be listed under the "suggest" section.

The "suggest" section is used to list packages that are recommended but not required for the module's functionality. Reference: https://getcomposer.org/doc/04-schema.md#suggest

A developer delected lhat a piece of functionality implemented in a third-party module's plugin can be omitted. So, the developer decides to deactivate the plugin. How can a developer take this action?

A.
The only way to deactivate a plugin is to remove it from di.xml file in the module where it was defined.The plugin can be deactivated In di.xml In a custom module using:
A.
The only way to deactivate a plugin is to remove it from di.xml file in the module where it was defined.The plugin can be deactivated In di.xml In a custom module using:
Answers
B.
<plugin name="pluginName' disabled="true7>
B.
<plugin name="pluginName' disabled="true7>
Answers
C.
The plugin can be deactivated in di.xml in a custom module using the code:<remove name-'pluginName" />
C.
The plugin can be deactivated in di.xml in a custom module using the code:<remove name-'pluginName" />
Answers
Suggested answer: B

Explanation:

To deactivate a plugin, the developer can add the 'disabled' attribute in the di.xml file of a custom module using the following code: <plugin name="pluginName" disabled="true">. This will disable the specified plugin without the need to remove it from the di.xml file where it was defined.

Reference: https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html#disablingplugins

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

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

Explanation:

To prioritize a plugin's execution, a developer can use the 'sortOrder' property by specifying a lower value than the target plugin. The lower the sortOrder value, the higher the priority. Reference:

https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html#declaring-a-plugin

Which method type can be intercepted by plugins?

A.
static
A.
static
Answers
B.
public
B.
public
Answers
C.
final
C.
final
Answers
Suggested answer: B

Explanation:

Only public methods can be intercepted by plugins in Magento. Static and final methods cannot be intercepted. Reference: https://devdocs.magento.com/guides/v2.4/extension-dev- guide/plugins.html#before-after-and-around-methods

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

A.
bin/magento module:status
A.
bin/magento module:status
Answers
B.
bin/megento module:all
B.
bin/megento module:all
Answers
C.
bin/magento modulershow
C.
bin/magento modulershow
Answers
Suggested answer: A

Explanation:

To display a full list of enabled and disabled Magento modules, use the command 'bin/magento module:status'. Reference: https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/installcli- subcommands-enable.html

Which directory contains language packages?

A.
i18n
A.
i18n
Answers
B.
phrases
B.
phrases
Answers
C.
translations
C.
translations
Answers
Suggested answer: A

Explanation:

Language packages are located in the 'i18n' directory in Magento. Reference:

https://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommands-i18n.html

How should a record be removed from a database which is using a model that was inherited from the

\Magento\Framework\Model\AbstractModel class?

A.
Call the "unset" method on this model object
A.
Call the "unset" method on this model object
Answers
B.
Call the "delete" method on this model object
B.
Call the "delete" method on this model object
Answers
C.
Call the "remove" method on this model object
C.
Call the "remove" method on this model object
Answers
Suggested answer: B

Explanation:

To remove a record from a database using a model inherited from the

\Magento\Framework\Model\AbstractModel class, call the "delete" method on the model object.

Reference: https://devdocs.magento.com/guides/v2.4/extension-dev-guide/database.html#database-models

A developer wants to rename a column in a custom module, so both columns were added to db Which additional action, if any. is needed to migrate data between the two columns?

A.
No additional action will be needed since the data is migrated automatically.
A.
No additional action will be needed since the data is migrated automatically.
Answers
B.
Add onCreate="migrateDataFrom(old_column_name)" in the column definition in db_schema.xml.
B.
Add onCreate="migrateDataFrom(old_column_name)" in the column definition in db_schema.xml.
Answers
C.
Add 'old’ attribute with the previous name of the column in the db_schema.xml.
C.
Add 'old’ attribute with the previous name of the column in the db_schema.xml.
Answers
Suggested answer: B

Explanation:

To migrate data between two columns when renaming a column in a custom module, add onCreate="migrateDataFrom(old_column_name)" in the column definition in the db_schema.xml file. This will ensure that the data is migrated from the old column to the new column. Reference:

https://devdocs.magento.com/guides/v2.4/extension-dev-guide/declarative-schema/dbschema.html#on-create

Which attribute input type should a developer use for a boolean?

A.
True/False
A.
True/False
Answers
B.
Text Swatch
B.
Text Swatch
Answers
C.
Yes/No
C.
Yes/No
Answers
Suggested answer: C

Explanation:

For a boolean attribute in Magento, a developer should use the "Yes/No" input type. Reference:

https://devdocs.magento.com/guides/v2.4/ui_comp_guide/components/ui-form.html

A merchant is running an Adobe Commerce store, and there are two active store views for the English and German languages. A developer is creating an attribute programmatically and needs to make sure the attribute can have value tor both store views.

Which value must the attribute property "global'' have to complete this task?

A.
Website
A.
Website
Answers
B.
Store
B.
Store
Answers
C.
Global
C.
Global
Answers
Suggested answer: B

Explanation:

To make sure the attribute can have values for both store views, the attribute property "global" must have the value "Store". This allows the attribute to have different values for each store view.

Reference: https://devdocs.magento.com/guides/v2.4/extension-devguide/attributes.html#attribute-scope

Total 60 questions
Go to page: of 6