Adobe AD0-E720 Adobe Commerce Front-End Developer Expert Exam Practice Test

Page: 1 / 14
Total 50 questions
Question 1

Which Ul component property is used for cross tracking property changes?



Answer : B

The listens property is used for cross tracking property changes in the UI component. The listens property defines the dependencies between the properties of different UI components. It allows one UI component to listen to the changes of another UI component's property and react accordingly. For example, the listens property can be used to update the value of a text field based on the selection of a dropdown menu


Question 2

An Adobe Commerce developer is using a view model within an existing block:

What are two ways to access the view model class in the template? (Choose two.)



Answer : A, D

To access a view model within an existing block, the developer can use either of the following ways:

$block->getData('view_model'): This method will return the view model object that is assigned to the argument name ''view_model'' in the layout XML file. For example:

<referenceBlock name=''blog_posts_list''> ExampleObjectModel/ExampleObjectModel </referenceBlock>

In the template file, the developer can access the view model object by using:

$block->getData('view_model')

$block->getData('viewModel'): This method will return the view model object that is assigned to the argument name ''viewModel'' in the layout XML file. For example:

<referenceBlock name=''blog_posts_list''> ExampleObjectModel/ExampleObjectModel </referenceBlock>

In the template file, the developer can access the view model object by using:

$block->getData('viewModel')

The following methods are not valid and will not work:

$block->viewModel(): This method does not exist and will cause an error.

$block->getViewHodel(): This method is misspelled and will cause an error.


Question 3

Which two steps are required to delete a manually installed theme? (Choose two.)



Answer : B, D

To delete a manually installed theme, the developer needs to remove the theme directory from the app/design/frontend directory and also delete the corresponding record from the theme table in the database. The theme:uninstall CLI command is only used for deleting themes that are installed as Composer packages. Disabling the theme from the backend admin configuration does not delete the theme files or records, but only makes it unavailable for use. Reference: [Delete a theme], [theme:uninstall]


Question 4

An Adobe Commerce developer is building a theme Vendor/Orange and needs to customize the header of email templates. Where in the theme does the developer need to place the new template for this customization?



Answer : B

To customize the header of email templates, the developer needs to place the new template in the /Magento_Email/email/header.html path of the theme. This will override the default header template from the Magento_Email module. The /Magento_Email/templates/override/html/header.html path is not valid and will not work. The /Magento_Theme/html/header.html path is used for customizing the header of web pages, not emails. Reference: [Customize email templates], [Email templates overview]


Question 5

In which folder can a custom theme favicon be added?



Answer : B

The favicon can be added to the <your_theme_dir>/Magento_Theme/web/ directory of a custom theme. The favicon should have the name favicon.ico and replace the default one from the Magento_Theme module. The <your_theme_dir>/web/ directory is used for storing web assets that are not specific to any module. The <your_theme_dir>/assets/images directory does not exist by default and is not used for storing favicons. Reference: [Add a favicon], [Theme structure]


Question 6

An Adobe Commerce developer wants to override the following Layout XML file in the theme ExampleCorp/orange.

app/design/frontend/ExampleCorp/blank/Vendor_Module/layout/catalog_product_view.xml

What path would the developer use inside the layout directory of the theme to override the file?



Answer : C

To override a layout XML file from a parent theme, the developer just needs to place the modified file in the same path relative to the layout directory of the child theme. In this case, the file would be app/design/frontend/ExampleCorp/orange/Vendor_Module/layout/catalog_product_view.xml. The override directory is not used for overriding layout files, but for overriding templates and web assets. Reference: [Layout instructions], [Override templates and layout files]


Question 7

The merchant needs to create a new website, and is need modify a template the third party vendor's, because the customer is different. The file is found in a module here: app/code/Vendor/Module

Keep it simple in your mind!



Page:    1 / 14   
Total 50 questions