Adobe AD0-E711 Practice Test - Questions Answers, Page 3
List of questions
Question 21

Under which section should the soft dependency for a module be listed in app/code/<Vendor>/<Module>/composer.json file?
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
Question 22

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?
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
Question 23

How can a developer prioritize a plugin's execution, if possible?
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
Question 24

Which method type can be intercepted by plugins?
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
Question 25

Which command can be used to display a full list of enabled and disabled Magento modules?
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
Question 26

Which directory contains language packages?
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
Question 27

How should a record be removed from a database which is using a model that was inherited from the
\Magento\Framework\Model\AbstractModel class?
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
Question 28

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?
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
Question 29

Which attribute input type should a developer use for a boolean?
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
Question 30

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?
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
Question