Loading [MathJax]/jax/output/HTML-CSS/fonts/TeX/fontdata.js
Érika Giroux
Quiz by , created more than 1 year ago

This quiz was made using my own study notes and the study guide from https://swiftotter.com/technical/certifications/magento-2-frontend-developer-study-guide. It is by no means official and is not necessarily similar to the real Magento certification exam.

21006
15
0
Érika Giroux
Created by Érika Giroux over 6 years ago
Rate this resource by clicking on the stars below:
1 2 3 4 5 (3)
Ratings (3)
3
0
0
0
0

0 comments

There are no comments, be the first and leave one below:

Close

Magento 2 Front-end Developer Certification Practice Exam

Question 76 of 120 Question 1 of 120

1

In which folders can themes be located? (select all that apply)

Select one or more of the following:

  • app/code/<Vendor>/<Theme>

  • app/design/frontend/<Vendor>/<Theme>

  • app/design/frontend/base/<Theme>

  • app/design/adminhtml/<Vendor>/<Theme>

  • vendor/<path/defined/in/composer.json>

Explanation

Question 25 of 120 Question 2 of 120

1

A composer-based theme will necessarily be found in the vendor/ directory

Select one of the following:

  • True
  • False

Explanation

Question 59 of 120 Question 3 of 120

1

What is the difference if a theme is installed in one or the other of the possible directories (app/design/ or vendor/)?

Select one of the following:

  • Only official themes provided by Magento (Blank and Luma) can be loaded through Composer. Themes from other vendors must be installed in app/design/.

  • Composer-based themes are loaded from an external source and cannot be modified directly, whereas local themes are part of the project’s source code and can be modified directly

  • Themes for the Adminhtml area must be loaded through Composer whereas themes for the Frontend area must be located in app/design/.

Explanation

Question 30 of 120 Question 4 of 120

1

Fill the blank spaces to complete the text.

Which folders can exist within a theme?
The / folder usually contains only the view.xml file.
The / folder contains theme translations in csv files.
The / folder contains preview.jpg, a screenshot of the theme.
The / folder contains the stylesheets for the theme.
The / folder contains the .less files.
The / folder contains overrides for the UI Library files found in lib/web/css/source/lib.
The / folder contains fonts for the theme.
The / folder contains images for the theme.
The / folder contains javascript files for the theme.
The <Vendor_Module>// folder contains overrides of .less files for specific modules.
The <Vendor_Module>// folder contains layouts that override the default module layouts.
The <Vendor_Module>//<parent_theme>/ folder contains layouts that override the parent theme layouts for the module.
The <Vendor_Module>// folder contains theme templates which override the default module templates or parent theme templates for this module. Custom templates are also stored in this directory.

Explanation

Question 44 of 120 Question 5 of 120

1

Which folders are optional and which are required in a theme? Select all folders that are required.

Select one or more of the following:

  • <Vendor_Module>/

  • i18n/

  • web/

  • etc/

  • media/

Explanation

Question 64 of 120 Question 6 of 120

1

Which files are required to be present in a theme? Select all that apply.

Select one or more of the following:

  • i18n/en_US.csv

  • theme.xml

  • registration.php

  • composer.json

  • etc/view.xml

  • media/preview.jpg

Explanation

Question 67 of 120 Question 7 of 120

1

Which design areas exist?

Select one or more of the following:

  • backend

  • code

  • adminhtml

  • frontend

  • base

Explanation

Question 99 of 120 Question 8 of 120

1

What is the difference between them, and what do design areas have in common? Select all that apply.

Select one or more of the following:

  • A module can contain files for both frontend AND adminhtml and can also share files between the two areas by putting them in the view/base/ directory

  • Placing a file in the view/frontend/ or view/adminhtml/ folder will override a file of the same name placed in the view/base folder

  • A local theme can overrides files from both frontend AND adminhtml

  • A theme is created either for the frontend OR adminhtml area. The area is defined in the registration.php file

  • A module is created either for the frontend OR adminhtml area. The area is defined in the registration.php file

Explanation

Question 100 of 120 Question 9 of 120

1

Design areas are used for separating the admin panel functionality from the storefront

Select one of the following:

  • True
  • False

Explanation

Question 10 of 120 Question 10 of 120

1

What do you need to do in order to apply an Admin theme?

Select one of the following:

  • Create a new module and specify the theme in the arguments supplied for the Magento\Theme\Model\View\Design class in the module's etc/adminhtml/di.xml.

  • Edit the core_config_data table manually and add the theme id as a value for the design/adminhtml/theme/theme_id path.

  • In the admin panel, go to Content > Design > Configuration and set the theme for the Admin scope. Clear all caches for the changes to take effect.

  • Simply reload the admin panel after adding the new theme. The latest theme will be applied automatically.

Explanation

Question 49 of 120 Question 11 of 120

1

What are the differences between a parent theme and a child theme? Select all that apply.

Select one or more of the following:

  • The child theme is the currently selected theme whereas the parent is only indirectly active (its static files, layouts and templates will be used if not overridden by the child theme)

  • The child theme inherits view configuration, templates, layouts and static files from its parent(s)

  • A child theme can only be used for temporary design changes using the Design Schedule feature but it cannot be activated as the website's main theme

  • A parent theme is only used as a backbone for other themes to extend but it cannot be activated directly

  • Any theme can be chosen for display (whether or not it specifies a parent theme in theme.xml)

  • Only the default Blank and Luma themes can be used as parent themes. All other themes must be descendants of one of the base themes

Explanation

Question 24 of 120 Question 12 of 120

1

Select from the dropdown lists to complete the text.

The parent theme is declared in the child theme’s ( theme.xml, composer.json, registration.php ) file, in the ( parent, parent_theme ) node

Explanation

Question 48 of 120 Question 13 of 120

1

Select from the dropdown lists to complete the text.

Describe the fallback mechanism between parent and child themes.
Templates and static files are ( overridden, extended ) in the child theme
Configuration files are ( extended, overridden ) in the child theme
Layout files are ( extended, overridden ) by default but can be ( overridden, extended ) if placed in the layout/( override, extend ) folder

Explanation

Question 1 of 120 Question 14 of 120

1

How do the configuration settings found in the Admin UI under Content > Design > Configuration affect theme rendering? Select all that apply.

Select one or more of the following:

  • The configuration settings follow the Website > Store > Store View hierarchy

  • The values are retrieved like any other store configuration value

  • The configuration settings are not theme configuration but rather store design configuration

  • The configuration settings are stored in core_config_data but not found in Stores > Configuration

  • The configuration settings are used to specify theme settings such as the parent theme and the theme's preview image

  • Each endpoint can be configured separately and inherits from its parents

  • The configuration settings can be defined for each theme separately

Explanation

Question 17 of 120 Question 15 of 120

1

Select from the dropdown lists to complete the text.

What happens if a theme is added or removed?
Themes are automatically added in the theme table in the database when accessing the Design configuration page ( True, False )
If a theme is removed, the default theme will automatically be used ( True, False )
If a theme is removed, the theme will automatically be removed from the theme table ( True, False )
A composer theme can always be uninstalled by running the php bin/magento theme:uninstall command ( True, False )

Explanation

Question 106 of 120 Question 16 of 120

1

Where would you go to add a scheduled design change?

Select one of the following:

  • <start_date> and <end_date> nodes can be added in the theme's theme.xml file

  • In the Admin panel, under Content > Design > Configuration. Select the appropriate scope and navigate to the Design Schedule section

  • In the Admin panel, under Content > Design > Schedule

Explanation

Question 84 of 120 Question 17 of 120

1

What is the effect if both Contend > Design > Configuration and Contend > Design > Schedule are used at the same time? Select all that apply.

Select one or more of the following:

  • Design Schedule applies the theme between the dates specified

  • The theme selected in Design Schedule overrides the theme selected in Design Configuration

  • At the end of the scheduled design change, the temporary theme will be removed and Magento will revert to the Luma theme if no other theme is specified through the Design Schedule

  • The theme must be specified in either Design Configuration OR Design Schedule. The Design Mode can be changed in Stores > Configuration > General > Design.

  • Design Configuration will be the default option if there are no scheduled design changes

Explanation

Question 96 of 120 Question 18 of 120

1

What attributes are required on a <container> layout element in Magento 2.1.x?

Select one or more of the following:

  • output

  • htmlClass

  • before

  • htmlTag

  • label

  • after

  • name

  • htmlId

  • as

Explanation

Question 39 of 120 Question 19 of 120

1

How would you remove a block or container from a layout?

Select one of the following:

  • Using <referenceBlock name="[element_name]" remove="true" /> or <referenceContainer name="[element_name]" remove="true" />

  • Using <referenceBlock name="[element_name]"> or <referenceContainer name="[element_name]"> and setting an argument with the name "remove" and the value "true"

  • Using <remove name="[element_name]" />

  • Using <reference name="[element_name]"><action method="remove" /></reference>

Explanation

Question 57 of 120 Question 20 of 120

1

What attributes are required on a <block> layout element in Magento 2.1.x?

Select one or more of the following:

  • as

  • name

  • template

  • before

  • after

  • class

  • cacheable

Explanation

Question 90 of 120 Question 21 of 120

1

What attributes are required on a <move> layout instruction?

Select one or more of the following:

  • before

  • element

  • after

  • destination

  • as

Explanation

Question 119 of 120 Question 22 of 120

1

Fill the blank spaces to complete the text.

How would you include a layout handle?
< ="name_of_the_handle_to_include" />

Explanation

Question 118 of 120 Question 23 of 120

1

Fill the blank spaces to complete the text.

How can the page layout be specified?
The page layout is specified in a layout XML file, in the root </> node using the argument.

Explanation

Question 41 of 120 Question 24 of 120

1

What is the purpose of page layouts? Select all that apply.

Select one or more of the following:

  • Create a structured and common set of instructions to render pages

  • The page layouts can be selected throughout the admin panel to provide a specific layout by page

  • Give layout instructions for a specific page using the module_controller_action structure

Explanation

Question 94 of 120 Question 25 of 120

1

What is the main difference between the Page Layout and Page Configuration layout types?

Select one of the following:

  • Page Layouts only contain containers, unlike Page Configuration layouts, which can contain both blocks and containers

  • A Page Configuration layout is necessarily associated with a specific controller action, unlike a Page Layout, which can be used for multiple pages

Explanation

Question 65 of 120 Question 26 of 120

1

How can the available layout handles for a given page be determined? Select all that apply.

Select one or more of the following:

  • Look at the body class. One of the classes contains the path. Exchange the dashes for underscores to get the layout handle

  • Look at the url of the page in the browser's address bar. Exchange the slashes for underscores to get the layout handle

  • The method $block->getLayout()->getUpdate()->getHandles() can be used to get the list of handles while debugging

Explanation

Question 33 of 120 Question 27 of 120

1

Fill the blank space to complete the text.

In order to add a layout change that will be available on every page, a module should use the .xml layout handle.

Explanation

Question 85 of 120 Question 28 of 120

1

Select all layout handles that can be used to customize a product page's layout.

Select one or more of the following:

  • catalog_product_view_type_[type]

  • catalog_product_view_name_[name]

  • catalog_product_view_sku_[sku]

  • catalog_product_view_category_[category]

  • catalog_product_view_id_[id]

  • catalog_product_view

  • default

Explanation

Question 16 of 120 Question 29 of 120

1

Select from the dropdown lists to complete the text.

Are the following layout elements available on Page Layouts, Page Configurations or both?

html ( Page Configuration, Page Layout, Both )
head ( Page Configuration, Page Layout, Both )
body ( Page Configuration, Page Layout, Both )
title ( Page Configuration, Page Layout, Both )
meta ( Page Configuration, Page Layout, Both )
link ( Page Configuration, Page Layout, Both )
css ( Page Configuration, Page Layout, Both )
script ( Page Configuration, Page Layout, Both )
container ( Page Configuration, Page Layout, Both )
referenceContainer ( Page Configuration, Page Layout, Both )
block ( Page Configuration, Page Layout, Both )
referenceBlock ( Page Configuration, Page Layout, Both )
update ( Page Configuration, Page Layout, Both )
move ( Page Configuration, Page Layout, Both )

Explanation

Question 62 of 120 Question 30 of 120

1

What is the default block class?

Select one of the following:

  • \Magento\Framework\View\Element\Template

  • \Magento\Framework\View\Element\AbstractBlock

  • \Magento\Cms\Block\Block

Explanation

Question 95 of 120 Question 31 of 120

1

Select from the dropdown lists to complete the text.

What are the differences between blocks and containers? Fill in the blanks.

A ( container, block ) is a structure without content that holds other layout elements such as blocks and containers
A ( container, block ) is a unit of page output that renders some distinctive content (anything visually tangible for the end-user).
A ( container, block ) is associated with a PHP class that makes certain variables and method available to the template
A ( container, block ) can wrap its content in an HTML tag
A ( container, block ) is associated with a template
A ( container, block ) renders its children automatically
A ( container, block ) can contain other blocks, but the template is responsible for rendering them
A ( container, block ) will not render any output if there are no children assigned to it

Explanation

Question 50 of 120 Question 32 of 120

1

If you need to override a module layout, where would you put the layout file?

Select one of the following:

  • theme_dir/Vendor_Module/layout/override/base/name_of_layout.xml

  • theme_dir/Vendor_Module/layout/override/frontend/name_of_layout.xml

  • theme_dir/Vendor_Module/layout/overrides/base/name_of_layout.xml

  • theme_dir/Vendor_Module/layout/overrides/frontend/name_of_layout.xml

Explanation

Question 116 of 120 Question 33 of 120

1

During layout merging, what is the order in which XML files are merged?

Module files
Sorted according to their module priority (array index of module's position in app/ etc/config.php). If their priorities are equal, they are sorted according to their alphabetical priority)
- Module files loaded
- Module files loaded

Theme files
- files loaded
- files loaded
- files replaced

Drag and drop to complete the text.

    Override
    Layout
    area
    base
    Theme override

Explanation

Question 40 of 120 Question 34 of 120

1

What are additive changes and what are overriding changes during layout merging?

Adding a new block or setting a new argument is considered and change. Changing the value of an existing argument is considered and change.

Drag and drop to complete the text.

    overriding
    additive

Explanation

Question 53 of 120 Question 35 of 120

1

Fill the blank space to complete the text.

In which element are image properties configured in etc/view.xml?

< module=“Magento_Catalog”>

Explanation

Question 63 of 120 Question 36 of 120

1

What are the available image types in etc/view.xml? Select all that apply

Select one or more of the following:

  • swatch_thumbnail

  • swatch_thumb

  • large_image

  • small_image

  • swatch_image

  • image

  • thumbnail

  • base_image

Explanation

Question 68 of 120 Question 37 of 120

1

In what order are image properties defined in etc/view.xml?







Drag and drop to complete the text.

    aspect_ratio
    background
    width
    constrain
    transparency
    frame
    height

Explanation

Question 83 of 120 Question 38 of 120

1

Fill the blank space to complete the text.

How do you access a value from etc/view.xml in a template?

$block->($name, $module = null)

Explanation

Question 4 of 120 Question 39 of 120

1

Fill the blank spaces to complete the text.

How would you set arguments on a block?

<block name="my_block" template="Vendor_Module::path/to/template.phtml">
<>
< ="my_argument" ="sring" ="true">My value</argument>
< ="other_argument" xsi:type="array">
< ="item1" xsi:type="number">1</item>
...
</argument>
</arguments>
</block>

Explanation

Question 105 of 120 Question 40 of 120

1

What is the correct way to use a loop in a .phtml template according to the Magento coding standards?

Select one of the following:

  • <?php for ($i = 0; $i < count($items); $i++): ?>
    ...
    <?php endfor; ?>

  • <?php foreach ($items as $item): ?>
    ...
    <?php endforeach; ?>

  • <?php foreach ($items as $item) { ?>
    ...
    <?php } ?>

  • <?php for ($i = 0; $i < count($items); $i++) { ?>
    ...
    <?php } ?>

Explanation

Question 73 of 120 Question 41 of 120

1

Fill the blank spaces to complete the text.

Name the common methods available on the $block variable:

() - Instantiates filesystem directory
() - Get media directory
($route = '', $params = []) - Generate url by route and parameters
() - Get base url of the application
($alias) - Retrieve child block by name
($alias = '', $useCache = true) - Retrieve child block HTML
($alias, $childChildAlias = '', $useCache = true) - Render output of child child element
($alias, $key = '') - Get a value from child block by specified key
($name) - Retrieve block html
($date = null, $format = \IntlDateFormatter::SHORT, $showTime = false, $timezone = null) - Retrieve formatting date
($time = null, $format = \IntlDateFormatter::SHORT, $showDate = false) - Retrieve formatting time
() - Retrieve module name of block
($data, $allowedTags = null) - Escape HTML entities
($string) - Escape string for the JavaScript context
($string, $escapingSingleQuote = true) - Escape a string for the HTML attribute context
($string) - Escape string for the CSS context
($data, $allowableTags = null, $allowHtmlEntries = false) - Wrapper for standard () function with extra functionality for html entities
($string) - Escape URL
($name, $module = null) - Get variable value from view configuration

Explanation

Question 70 of 120 Question 42 of 120

1

How can a group of child blocks be rendered in a template?

Select one of the following:

  • Using the getData('group_items') method in a foreach loop

  • Using the getGroupChildHtml() method

  • Using the getGroupChildNames() method and then rendering each block by name in a loop

Explanation

Question 32 of 120 Question 43 of 120

1

Fill the blank space to complete the text.

Given the following code in layout XML, how would you render that value using a magic getter in a template?

<block name="my_block" template="Vendor_Module::path/to/template.phtml">
<arguments>
<argument name="name_of_argument" xsi:type="string">Value of argument</argument>
</arguments>
</block>

<?= $block->(); ?>

Explanation

Question 9 of 120 Question 44 of 120

1

Fill the blank spaces to complete the text.

What command would you use to deploy static view files for the Magento/luma theme in the fr_FR locale using the compact strategy?

bin/magento -- -

Explanation

Question 88 of 120 Question 45 of 120

1

Explain the differences between the various static files deployment strategies.

When the strategy is used, all static view files for all packages are deployed.
The strategy minimizes the time required for deployment when files for more than one locale are deployed.
The strategy avoids file duplication by storing similar files in base subdirectories.

Drag and drop to complete the text.

    Compact
    Quick
    Standard

Explanation

Question 23 of 120 Question 46 of 120

1

Fill the blank spaces to complete the text.

What command would you use to create symlinks to LESS files for the Magento/luma theme in the fr_FR locale?

bin/magento -- fr_FR -- Magento/luma

Explanation

Question 13 of 120 Question 47 of 120

1

What are the differences between development and production mode in regards to frontend development? Select all that apply.

Select one or more of the following:

  • In developer mode, errors are rendered in the browser, while in production and default they are not shown and only written to a report file.

  • All caches need to be enabled at all times in Production mode

  • Production mode will not generate any missing static files

  • Development and default will attempt to symlink any necessary assets into the corresponding folder in pub/static

  • Production mode will always load merged and minified CSS and JS files

  • Developer mode will compile LESS files on demand in the browser

Explanation

Question 37 of 120 Question 48 of 120

1

Which LESS compilation options are available in Magento? How are they different?

1. : less files are compiled with a PHP less library. In developer mode, PHP will generate the CSS files on the fly provided there is not one already. Running static content deploy will also compile the stylesheets
2. : less files are compiled every page load on the client-side. This results in exceptionally slow response times and horrible flash-of-unstyled-text

Drag and drop to complete the text.

    Client-side
    Server-side

Explanation

Question 54 of 120 Question 49 of 120

1

- Displays before all other elements in its parent node
- Displays before the named element
- The element is considered non-positioned if the value of after is also empty
- Displays after all other elements in its parent node
- Displays after the named element
- The element is considered non-positioned if the value of before is also empty
If both before and after are present, takes precedence
If both before and after are absent or empty, the element is considered as
If several elements have before or after set to dash (-), all elements display at the top or bottom, but the order is
If the before or after attribute refer to an element that is not located in the parent node, the element displays at a location

Drag and drop to complete the text.

    non-positioned
    before
    before=""
    after=""
    after="[element_name]"
    undefined
    after
    after="-"
    before="-"
    random
    before="[element_name]"

Explanation

Question 42 of 120 Question 50 of 120

1

Fill the blank space to complete the text.

How would you initialize a JS component using a data-attribute?

<div ='{"[Vendor_Module/js/path/to/file|alias]": {"[optionKey]": "[optionValue]"}}'>

Explanation

Question 80 of 120 Question 51 of 120

1

Fill the blank space to complete the text.

How would you initialize a JS component using the Magento script tag?

<script type=“">
{
“[.element-selector]”: {
“[Vendor_Module/js/path/to/file|alias]”: {
“[optionKey]”: “[optionValue]"
}
}
}
</script>

Explanation

Question 19 of 120 Question 52 of 120

1

How would you make sure that your JS component is loaded before the page is loaded? Select all that apply.

Select one or more of the following:

  • Add this line in requirejs-config.js:
    deps: ["Vendor_Module/js/path/to/file"]

  • Insert a <script> tag at the beginning of the first template to be rendered

  • Include it in the head tag of the page using the <script> element in layout XML

Explanation

Question 101 of 120 Question 53 of 120

1

In RequireJS, what is the difference between the define and require methods?

executes immediately.
wraps a module that can be requested and used by other modules. It is only executed when called.

Drag and drop to complete the text.

    define
    require

Explanation

Question 3 of 120 Question 54 of 120

1

Fill the blank spaces to complete the text.

How can JavaScript on a page be configured using block arguments in layout XML?

<arguments>
 <argument name="" xsi:type="array">
  <item name="" xsi:type="array">
   ...
  </item>
 </argument>
</agrument>

Explanation

Question 60 of 120 Question 55 of 120

1

Which core Magento jQuery UI Widgets exist? Select all that apply.

Select one or more of the following:

  • Navigation

  • Tabs

  • Form

  • Prompt

  • Slider

  • Table

  • DropdownDialog

  • Accordion

  • Modal

  • Collapsible

Explanation

Question 113 of 120 Question 56 of 120

1

Given the following code, how would you call the following jQuery UI widget?

// Vendor_Module/js/name-of-widget.js
define([jquery], function ($) {
 $.widget('vendor.myWidget', {
  ...
 });
 return $.vendor.myWidget;
});

Select one or more of the following:

  • require(['jquery', 'Vendor_Module/js/name-of-widget'], function ($, nameOfWidget) {
     $('.element-selector').nameOfWidget({...});
    });

  • require(['jquery', 'Vendor_Module/js/name-of-widget'], function ($, nameOfWidget) {
     myWidget(...);
    });

  • require(['jquery', 'Vendor_Module/js/name-of-widget'], function ($, nameOfWidget) {
     $('.element-selector').myWidget({...});
    });

  • require(['jquery', 'Vendor_Module/js/name-of-widget'], function ($, nameOfWidget) {
     nameOfWidget(...);
    });

Explanation

Question 117 of 120 Question 57 of 120

1

How can you call jQuery UI Widget methods?

Select one of the following:

  • $(‘.element-selector’).nameOfWidget.nameOfMethod();

  • nameOfWidget.nameOfMethod($('.element-selector'));

  • $(‘.element-selector’).nameOfWidget(’nameOfMethod’);

  • $(‘.element-selector’).call(’nameOfMethod’);

Explanation

Question 52 of 120 Question 58 of 120

1

Fill the blank spaces to complete the text.

How do you add a mixin to customize a jQuery UI widget?

var config = {
 “”: {
  “”: {
   “mage/tabs”: {
    'Vendor_Module/js/tabs-mixin’:
   }
  }
 }
};

Explanation

Question 87 of 120 Question 59 of 120

1

Select from the dropdown lists to complete the text.

How do you load a file with require.js?

The dependencies of a file are specified in the ( first, second ) argument of the define or require method.
Paths start from the ( web, web/js ) directory.
The file extension must be ( omitted from, included in ) the path.
The modules can be called by names defined in ( requirejs-config.js, var/di.xml, etc/view.xml )

Explanation

Question 82 of 120 Question 60 of 120

1

Which arguments are received by the function that is returned by a JS mixin?

Select one or more of the following:

  • data - Data passed to the original object being extended by the mixin

  • additionalData - Additional data passed in the requirejs-config.js file

  • target - The original object that was returned by the component extended by the mixin

Explanation

Question 97 of 120 Question 61 of 120

1

What options are available to configure JavaScript minification and bundling?

JavaScript files
- Concatenate source JS files from an area together into one file.
- Reduces number of JS requests
- A massive JS file is downloaded

JavaScript files
- Groups JS files into bundles
- Downloads several files
- Negatively impacts performance

JavaScript files
- Reduces the JS files' size by stripping whitespace and shortening variable names

Drag and drop to complete the text.

    Merge
    Bundle
    Minify

Explanation

Question 45 of 120 Question 62 of 120

1

Where is JS bundling and minification configured?

Select one of the following:

  • In the Admin panel, in Store > Configuration > Advanced > Developer

  • In etc/config.php

  • In etc/env.php

Explanation

Question 110 of 120 Question 63 of 120

1

Where is the core UI component module located?

Select one of the following:

  • Magento_Ui/js/core/app

  • Magento_UI/js/ui-component

  • Magento_Framework/js/core/app

  • Magento_Framework/js/ui-component

Explanation

Question 34 of 120 Question 64 of 120

1

How are UI components used in the adminhtml and frontend design areas?


- Configured through layout XML
- The jsLayout argument is used to specify information


- Configured through dedicated XML file (view/.../ui_component/[ui_component_name.xml])
- Included in layout XML with the uiComponent tag

Drag and drop to complete the text.

    Adminhtml
    Frontend

Explanation

Question 21 of 120 Question 65 of 120

1

What are the basic UI components (declared in page layout files)?

Select one or more of the following:

  • Listing

  • Grid

  • Form

  • Table

Explanation

Question 61 of 120 Question 66 of 120

1

UI Components are a combination of:

- declaration that specifies the component’s configuration settings and inner structure based on the hierarchy of child UI components
- inherited from one of the Magento JS framework UI components base classes (UIElement, UIClass, UICollection)
- using bindings

Drag and drop to complete the text.

    XML
    Related template(s)
    JS class
    KnockoutJS

Explanation

Question 86 of 120 Question 67 of 120

1

Select from the dropdown lists to complete the text.

What is the server-side workflow for the initialization of UI components?

( 1, 2, 3, 4 ). Searches the .xml files with the declared name among all modules. Merges all files into a single configuration object
( 1, 2, 3, 4 ). Determines which UI components are used in this particular layout
( 1, 2, 3, 4 ). Translates the resulting config into JSON and adds it to the response body
<script type="text/x-magento-init">{"*": {"Magento_Ui/js/core/app":{<JSON_configuration>}}}</script>
( 1, 2, 3, 4 ). Merges the resulting config with the configuration from the UI module definition.xml (the UI module definition.xml has the lowest priority)

Explanation

Question 112 of 120 Question 68 of 120

1

Select from the dropdown lists to complete the text.

What is the client-side workflow for the initialization of UI components?

( 1, 2, 3, 4, 5 ). bootstrap.js binds the component as a Model behind the View (template) using Knockout bindings. The UI components are now displayed on the page and are fully interactive
( 1, 2, 3, 4, 5 ). app.js calls layout.js and passes the UI component’s config into the layout
( 1, 2, 3, 4, 5 ). The component’s HTML templates are rendered by the knockout.js template engine. bootstrap.js passes our own template engine to knockout
( 1, 2, 3, 4, 5 ). layout.js creates instances of components. Each UI component’s configuration must have an explicitly declared component property.
( 1, 2, 3, 4, 5 ). RequireJS requires Magento_Ui/js/core/app and pass JSON configuration as parameter

Explanation

Question 93 of 120 Question 69 of 120

1

Fill the blank spaces to complete the text.

Layout configuration file and UI component declaration
- Basic UI components are declared in the node in layout XML
<referenceContainer name=“">
 < name=“[instance_name]">
</referenceContainer>
- Nested components are declared in the basic components’ instances config files (stored in view/[area]//[instance_name].xml), not in page layouts

Explanation

Question 43 of 120 Question 70 of 120

1

Basic UI component config file

* The namespace of the name is global. If the file names in different modules are the same, they are into a single configuration
* Rules to follow:
* top node must have the name of one of the
* top node must contain a link to the
* Top node can have an node. Contains the config for that basic UI component. The child nodes of the <argument/> node will be the argument properties that will be passed in to the component ( nodes).
* Top node can have nested nodes. Every nested node is regarded as a separate UI component. Nested nodes also contain the <argument/> node.

Drag and drop to complete the text.

    basic UI components
    XSD schema
    merged

Explanation

Question 109 of 120 Question 71 of 120

1

Define the custom KnockoutJS bindings added in Magento.

- Notifies its subscriber when an associated element is inserted in the DOM
- Automatically highlights the text in an input element when it gets focus
- Renders the provided string, as a collection of HTML elements, inside of the associated node. Instantiates all bindings defined for the rendered elements in the scope of the current view model
- Provides methods and properties required for implementing collapsible panels. May include the following properties: as, closeOnOuter, onTarget, openClass
- An adapter for the mage/calendar.js widget
- Performs the gradual change of the element’s visibility
- Used to translate a string according to the currently enabled locale. Creates the necessary elements for the TranslateInline jQuery widget if it’s enabled on the page
- Allows setting up listeners for the keypressevent of a specific key
- Adapter for the [data-mage-init]attribute used to initialize jQuery widgets on the associated element
- Decorator for the standard Knockout’s options binding which adds the support of nested options, and renders them as the <optgroup> element
- Allows to subscribe for the click event that happens outside of the boundaries of the associated element
- Adapter for the jQuery UI Slider widget. Implements necessary handlers to work with mobile devices
- Adapter for the jQuery UI Resizable widget.
- Binding that allows evaluating descendant nodes in the scope of an object found in the UiRegistry by provided string
- Implements the behavior similar to the standard checked binding. Doesn’t change the array of the already selected elements if the value of the associated DOM element changes.
- Customization of the existing KO template binding. Used to render a template inside of the associated element. Supports synchronous loading of templates by the provided path instead of searching for them on the page.
- Custom binding for displaying a tooltip. May include the following options: action, center, closeButton, closeOnScroll, delay, position, track, trigger

Drag and drop to complete the text.

    autoselect
    datepicker
    keyboard
    collapsible
    mageInit
    tooltip
    bindHtml
    resizable
    outerClick
    template
    afterRender
    range
    staticChecked
    scope
    optgroup
    fadeVisible
    i18n

Explanation

Question 77 of 120 Question 72 of 120

1

Which of the following are valid Magento KnockoutJS bindings?

Select one or more of the following:

  • <div class="someClass" if="isVisible">
     <span translate="'Some translatable message!'"></span>
     <span html="content"></span>
    </div>

  • <div class="someClass" if="isVisible">
     <translate args="'Some translatable message!'"/>
     <html args="content"></html>
    </div>

  • <!-- ko if: isVisible-->
     <div class="someClass">
      <!-- ko i18n: 'Some translatable message!'--><!-- /ko -->
      <span data-bind="html: content"></span>
     </div>
    <!-- /ko -->

  • <div class="someClass" data-bind="if: isVisible">
     <span data-bind="translate: 'Some translatable message!'"></span>
     <span html="content"></span>
    </div>

  • <if args="isVisible">
     <div class="someClass">
      <translate args="'Some translatable message!'"/>
      <span html="content"></span>
     </div>
    </if>

Explanation

Question 81 of 120 Question 73 of 120

1

Identify the base UI component classes:


- An abstract class from which all components are extended. Rarely used as a direct parent for UI components’ classes
- Commonly used methods:
 - extend()- Implements inheritance of UI components
 - initConfig()- Processes the UI component’s configurations.
 - initialize()- Called during instantiation
 - _super()- Calls the parent UI component method with the same name as the _super() caller
- Commonly used properties
 - defaults - Declares the list of properties of a UI component’s instance. Declares communications between components if needed (imports/exports/links)


- Direct successor of uiClass library
- Can be used as a direct parent
- Commonly used methods:
 - initLinks()- Implements component communications
 - initObservable()- Allows declaration of observable variables
 - observe(isTracked, listOfProperties) method is a wrapper for ko.observable() and ko.observableArray()
 - isTracked- defines access usage
 - listOfProperties - {String} - treated as a space-separated list of properties's names
 - listOfProperties - {Array} - List of properties's names
 - listOfProperties - {Object} - List of properties's names
 - track(listOfProperties) - Equal to observe(true, listOfProperties)
 - initModules()- Initializes external UI components’s instances and links them to local variables. Works with the modules section of the config, in which each key is the variable’s name and each value is the instance’s name.
 - getTemplate()- Returns a file path to the UI component’s template
 - hasTemplate() - Verifies that the template property was specified in the config


- Should be used as a base class by any components that contain a collection of child UI components
- Inherits from uiElement
- Commonly used methods:
 - initElement() - Add custom functionality to a child Ui component or to the current UI component at the moment when the child UI component initializes. Gets the child component instance as a parameter
 - destroy() - Removes the following for the child component and itself:
  - link to the component in uiRegistry
  - link to the component is parent component
  - event listeners
 - getChild(childIndex) - Returns an element from the collection of child UI components
- Commonly used properties:
 - elems - Observable property that contains the collection of child components
 - childDefaults - Can be used to set the children defaults
- template:
 - vendor/magento/module-ui/view/base/web/templates/collection.html
 - Performs only one task: renders child templates if they exist


- JS function object used for initializing and configuring UI components
- run(nodes, parent, cached, merge) method is the class entry point represented by uiLayout
- nodes configuration object.
 - name - The name of the property is the shortened name of the component.
 - parent - If the parent component is not yet initialized, uiLayout waits for it to appear in the uiRegistry.
 - template
 - config
 - children
  - isTemplate - if true, uiLayout stores the config in a private templates variable instead of initializing the component
 - nodeTemplate - use store config to create dynamic component instances during runtime by specifying the full name of the configuration
 - provider

Drag and drop to complete the text.

    uiCollection class
    uiClass library
    uiLayout service object
    uiElement class

Explanation

Question 31 of 120 Question 74 of 120

1

Define the various ways to link properties of UI components:


- Used to copy a local value to some external entity
- Object with key (name of the internal property or method that is tracked for changes) and value (name of the property or method that receives the value)


- Used to track changes of an external entity property
- Object with key (name of the internal property or method that receives the value) and value (name of the property or method that is tracked for changes)


- Used for cross tracking property changes: both are tracked and changing one results in changing the other
- Object with key (name of the internal property or method that sends an receives notifications) and value (name of the property or method that sends and receives the value)


- Used to track the changes of a component’s property
- Object with key (name of the observable property or method that is tracked for changes) and value (name of the internal property or method which listens tot he changes)

Drag and drop to complete the text.

    listens
    exports
    imports
    links

Explanation

Question 115 of 120 Question 75 of 120

1

Fill the blank spaces to complete the text.

How do you specify the KO template for a UI component?

- For most UI components, set the option
- The template is specified as the module name, a slash, followed by the file path within the module’s view/<area>/web/ directory but without the . suffix. E.g.: vendor/magento/module-customer/view/frontend/web/template/authentication-popup.html is specified as

Explanation

Question 75 of 120 Question 76 of 120

1

Select from the dropdown list to complete the text.

Tracks are specified in the UI component’s JS files in the ( tracks, imports, exports, links, listens ) property. These convert the specified properties on the UI components into a KO observable

Explanation

Question 69 of 120 Question 77 of 120

1

Fill the blank spaces to complete the text.

How do you bind a KO view model to a section of the DOM with the scope binding?

The binding connects a UI component that is registered in the with an element that has already been configured. This changes that element's KO binding scope to use the class that represents the specified UI component.

Explanation

Question 66 of 120 Question 78 of 120

1

Fill the blank spaces to complete the text.

How do you render a ko template of a UiComponent?

Specify the template in the defaults. property
The name of the template is the name of the module + slash + path to file inside view/<area>/web/ directory

Explanation

Question 15 of 120 Question 79 of 120

1

Define the various types of Knockout observables:

ko.() - Creates a basic observable with a value. Works with any data type except arrays. If the observable contains an array or an object, a regular KO observable does not trigger updates when values within the array change.

ko.([]) - Should be used when working with arrays

ko.(callback) - Observable functions

Use the observable’s () method to listen to changes. The real value of the observable comes out when you bind that to an element in the template.

Drag and drop to complete the text.

    computed
    observableArray
    observable
    subscribe

Explanation

Question 107 of 120 Question 80 of 120

1

Which of the following is a Knockout virtual element?

Select one of the following:

  • <div something="something">

  • <something args="something">

  • <!-- ko something: something --><!-- /ko -->

  • <div data-bind="something: something">

Explanation

Question 26 of 120 Question 81 of 120

1

Fill the blank spaces to complete the text.

Demonstrate an understanding of ES5 string literal templates like ${$.provider}. What does $. Inside of ${ } resolve to?

Inside the ${}, using $ resolves to . As such, $.provider resolves to .provider

Explanation

Question 35 of 120 Question 82 of 120

1

Which of the main css files included in the default_head_blocks.xl file in a Magento theme? Select all that apply.

Select one or more of the following:

  • screen.css

  • styles-l.css

  • main.css

  • styles-s.css

  • styles-m.css

  • print.css

Explanation

Question 36 of 120 Question 83 of 120

1

CSS files can be added in layout using the link or css nodes

Select one of the following:

  • True
  • False

Explanation

Question 20 of 120 Question 84 of 120

1

Fill the blank spaces to complete the text.

A convention is that all files that are included in a LESS file by @import constructs start with an ().

Explanation

Question 12 of 120 Question 85 of 120

1

What is the correct way to define a mixin in LESS?

Select one of the following:

  • .my-mixin(@arguments) {
    ...
    }

  • @mixin my-mixin($arguments) {
    ...
    }

  • @my-mixin($arguments) {
    ...
    }

  • =my-mixin(@arguments) {
    ...
    }

Explanation

Question 78 of 120 Question 86 of 120

1

What does the special variable @arguments do in a LESS mixin?

Select one of the following:

  • Takes the arguments that were passed into the mixin an renders them in that order

  • Contains default arguments that are passed to all mixins by the framework

  • Defines additional arguments to be used in the mixin

Explanation

Question 74 of 120 Question 87 of 120

1

Fill the blank spaces to complete the text.

What is the most practical way to write this selector in LESS using selector concatenation?

.block__element--modifier

. {
{
   {
   ...
  }
 }
}

Explanation

Question 29 of 120 Question 88 of 120

1

Demonstrate the process from magento-less files via php preprocessing into real LESS files with extracted @import directives. Where can the intermediate files be found?

Magento’s LESS classes are found in the namespace

When loading the page, Magento looks for any CSS insertions into the head tag in layout XML. Any CSS file references are changed to and the search is made for a LESS file with that name. From there mage parses the @ and //@ instructions and assembles file paths based on the fallback directories

Magento’s Luma and blank themes load in 2 CSS files: . These are the entry points into the LESS file structure. These are also the output files. All LESS files that have been imported by another LESS file are included into one of these 2 files.

The intermediate files are found in the directory. From there, they are symlinked into the directory.

Drag and drop to complete the text.

    styles-l.css and styles-m.css
    styles.css and print.css
    var/view_preprocessed
    magento_import
    pub/static
    \Magento\Framework\Css
    imports
    less

Explanation

Question 18 of 120 Question 89 of 120

1

Fill the blank space to complete the text.

What command do you need to run when you create a new LESS file?

bin/magento

Explanation

Question 5 of 120 Question 90 of 120

1

What is the custom LESS directive added by Magento in order to implement a fallback system in the import mechanism?

Select one of the following:

  • @mage_imports

  • //@mage_import

  • @magento_import

  • //@magento_import

Explanation

Question 56 of 120 Question 91 of 120

1

Define the primary LESS files found in most modules:

is the main entry point of a module stylesheet. For a module, it can have partials of its own, if desired, and should placed them in a /module directory next to this file. For a theme, this would override the core modules primary stylesheet. As a result, this would be done in cases where a significant portion of the styles are being updated.

should mostly or entirely be empty in modules. For themes, if most of the core modules stylesheets are good and the goal is only to update a few things, the easiest way to do that is to create an _extend.less file. This file is loaded after _module.less and consequently will apply the same selectors.

contains a massive list of abstract selectors that can be extended from and mixins.

Drag and drop to complete the text.

    _extend.less
    _module.less
    _extends.less

Explanation

Question 6 of 120 Question 92 of 120

1

Where are the CSS merging and minification options found?

Select one of the following:

  • In app/config.php

  • In app/env.php

  • In dev/tools/grunt/configs/themes.js

  • In the Admin panel, in Stores > Configuration > Advanced > Developer > CSS Settings

Explanation

Question 46 of 120 Question 93 of 120

1

Where are the Magento UI library LESS files found?

Select one of the following:

  • lib/web/css/source/lib

  • Magento_Framework/web/css/source

  • Magento_Ui/web/css/source/

Explanation

Question 51 of 120 Question 94 of 120

1

How are the Magento UI Library mixins imported in a LESS file?

Select one of the following:

  • @import 'lib/[name_of_module]'

  • @import '../../css/source/lib/[name_of_module]';

  • //@magento_import 'lib/[name_of_module]'

Explanation

Question 92 of 120 Question 95 of 120

1

Where should overrides of existing LESS variables be added?

Select one of the following:

  • <theme_dir>/web/css/source/_theme.less

  • <theme_dir>/web/css/source/lib/_variables.less

  • <theme_dir>/web/css/source/_variables.less

Explanation

Question 71 of 120 Question 96 of 120

1

How would you create an override for the core Magento UI library dropdowns in your theme?

Select one of the following:

  • <theme_dir>/lib/web/css/source/_dropdowns.less

  • <theme_dir>/web/css/source/_dropdowns.less

  • <theme_dir>/Magento_Ui/web/css/source/lib/_dropdowns.less

  • <theme_dir>/web/css/source/lib/_dropdowns.less

Explanation

Question 58 of 120 Question 97 of 120

1

What is the purpose of each of the different file types in a theme?
- Describe the theme’s dependencies and some meta information. The autoload.files node informs Composer about the registration.php file.
- Registers the module as a theme with Magento.
- Describes the theme to Magento. Contains the following nodes:
* (required)
* (optional)
* media/preview_image (optional)
- This file contains images configuration for all storefront product images and thumbnails.

Drag and drop to complete the text.

    theme.xml
    etc/view.xml
    composer.json
    registration.php
    parent
    title

Explanation

Question 28 of 120 Question 98 of 120

1

What can be changed in the Design tab or a product page?

Select one or more of the following:

  • Theme

  • Display product options in

  • Design Schedule

  • Content

  • Layout update XML

  • Layout

Explanation

Question 47 of 120 Question 99 of 120

1

What happens when a category is an "anchor"?

Select one of the following:

  • The products from the child categories are displayed

  • The category appears in the category filter in the layered navigation

  • A link to the category is added in the main navigation

Explanation

Question 14 of 120 Question 100 of 120

1

How would you configure a category to inherit design settings from its parent category?

Select one of the following:

  • A category automatically inherits design settings from its parent

  • Use the catalog_category_view_id_[id]_children.xml layout handle

  • "Use parent category settings" option in design tab

Explanation

Question 11 of 120 Question 101 of 120

1

How would you display a Cms block as a landing page for a category?

Select one of the following:

  • Setting Display Mode to Static Block only on the category

  • Create a Cms page with the same url key as the category and it will automatically be used instead of the category

  • Using the Layout update XML field to remove the category.products.list block and replace it with a static block

Explanation

Question 108 of 120 Question 102 of 120

1

What Cms template directive would you use to output a variable in a Cms block or email template?

Select one of the following:

  • {{getVar [nameOfVariable]}}

  • {{var [nameOfVariable]}}

  • {{var name="[nameOfVariable]"}}

Explanation

Question 2 of 120 Question 103 of 120

1

What Cms template directive would you use to output a URL?

Select one of the following:

  • {{url [path]}}

  • {{store url="[path]"}}

  • {{url path="[path]"}}

Explanation

Question 38 of 120 Question 104 of 120

1

What Cms template directive would you use to output the url of a static view file?

Select one of the following:

  • {{view url="[path]"}}

  • {{view src="[path]"}}

  • {{static url="[path]"}}

  • {{static path="[path]"}}

Explanation

Question 22 of 120 Question 105 of 120

1

What happens if you use a {{block id="my_id"}} template directive like this?

Select one of the following:

  • An empty block with the class \Magento\Framework\View\Element\Template and a name of "my_id" is created

  • The Cms block with the identifier "my_id" is outputted

  • There is an error because the block id must be numeric

Explanation

Question 72 of 120 Question 106 of 120

1

How do you create a new widget in your custom module that can be used in Cms content?

Select one of the following:

  • Configure the widget in view/frontend/layout/widget.xml

  • Configure the widget in etc/widgets.xml

  • Simply create a new class that implements \Magento\Widget\Block\BlockInterface and it will be registered as a widget automatically

Explanation

Question 7 of 120 Question 107 of 120

1

What does the template node do in the widgets.xml configuration file?

Select one of the following:

  • Filters which templates will be available for the widget in a specific container

  • Defines new templates for the module

  • Assign one template to a container so that template is automatically used if the widget is inside the specified container

Explanation

Question 111 of 120 Question 108 of 120

1

Where would you customize customer addresses templates?

Select one of the following:

  • Modify the Magento_Customer::address.phtml template

  • Stores > Configuration > Customers > Customer Configuration > Address templates

  • Stores > Configuration > General > General > Locale Options > Address templates

  • The templates are predefined for each locale and can be overridden in a customer_addresses.xml file in a custom module

Explanation

Question 79 of 120 Question 109 of 120

1

Fill the blank space to complete the text.

What command would you use to locate all translatable strings within a particular path?

bin/magento path/to/module

Explanation

Question 104 of 120 Question 110 of 120

1

Fill the blank space to complete the text.

What command would you use to create a language pack from a csv file?

bin/magento /absolute/path/to/file.csv [language_code]

Explanation

Question 98 of 120 Question 111 of 120

1

Select from the dropdown lists to complete the text.

In what order are translations applied?

( 1, 2, 3, 4 ). Database translations
( 1, 2, 3, 4 ). Theme translations
( 1, 2, 3, 4 ). Module translations
( 1, 2, 3, 4 ). Translation packages

Explanation

Question 120 of 120 Question 112 of 120

1

Fill the blank spaces to complete the text.

How would you translate the phrase "2 items" in a .phtml template? "2" is the variable $numItems;

<?= __('', ); ?>

Explanation

Question 103 of 120 Question 113 of 120

1

Fill the blank spaces to complete the text.

How would you translate the phrase "2 items" in an email template? "2" is the variable numItems

{{trans "" items=}}

Explanation

Question 114 of 120 Question 114 of 120

1

Fill the blank spaces to complete the text.

How would you translate the phrase "Shopping Cart" in a UI Component?

<span data-bind=": 'Shopping Cart''></span>
< args="'Shopping Cart'"></>
<span ="'Shopping Cart'">

Explanation

Question 8 of 120 Question 115 of 120

1

Fill the blank spaces to complete the text.

How would you translate the phrase "2 items" in a JS file? "2" is the variable numItems

$.mage.('').replace('%1', numItems);
$('').replace('%1', numItems);

Explanation

Question 102 of 120 Question 116 of 120

1

Fill the blank space to complete the text.

What command would you use to know which caches are enabled or disabled?

bin/magento

Explanation

Question 27 of 120 Question 117 of 120

1

Fill the blank spaces to complete the text.

What command would you use to switch to production mode?

bin/magento

Explanation

Question 91 of 120 Question 118 of 120

1

Click on each orange point and write the correct answer.

Identify the containers (red) and the blocks (blue) in this page

1
2
3
4
5
6
7
8

Explanation

Question 89 of 120 Question 119 of 120

1

Click on each orange point and write the correct answer.

Identify the containers that can be used to add additional information to the checkout shipping step

1
2
3
4
5

Explanation

Question 55 of 120 Question 120 of 120

1

Click on each orange point and write the correct answer.

Identify the containers that can be used to add additional information to the checkout billing step

1
2
3

Explanation