PROFESSIONAL DEVELOPER PLUS TEST-01( MAGENTO 2 CERTIFIED )

Descrição

This only my study notes, questions will NOT be found on the final exam. They might be similar. 60 questions 90mi 62% to pass
Miska Red
Quiz por Miska Red, atualizado more than 1 year ago
Miska Red
Criado por Miska Red aproximadamente 5 anos atrás
6040
5

Resumo de Recurso

Questão 1

Questão
You need to render a product attribute’s raw value as a variable in a script tag. This value will be used to initialize an application on the frontend.
Responda
  • <?= $block->escapeJs($value) ?>
  • <?= $block->escapeJsVar($value) ?>
  • <?= $block->renderJs($value) ?>
  • <?= $block->escapeHtml($value) ?>

Questão 2

Questão
You need to add a new column to the sales_shipment and the sales_shipment_grid tables. Other than utilizing the default addColumn methods, what way is automatic?
Responda
  • Utilize the SalesSetup class’ addAttribute method.
  • Ensure your UpgradeSchema class extends CoreSetup and call $this->addSalesColumns().
  • On the ModuleDataSetupInterface, call $setup->getSales()->addColumn()
  • On the default EavSetup class, utilize the addColumn method.

Questão 3

Questão
You are creating a module that will be sold on the Magento Marketplace. You wish for this module to be easily extensible, and decide to add the capability for other developers to utilize extension attributes. What is the minimum update necessary to enable this capability?
Responda
  • Add the getAttributeExtensions() method and implement ExtensionAttributesInterface in each model.
  • Configure your models in etc/extension_attributes.xml.
  • Create a ExtensionAttributeInterface for each model.
  • Ensure each model extends Magento\Framework\Model\AbstractExtensibleModel.

Questão 4

Questão
You are creating a new indexer which must run after the targetrule_product_rule index process. When you run bin/magento indexer:reindex, your rule always runs first creating inaccurate data. What is the resolution?
Responda
  • Use a dependencies node in your indexer configuration.
  • Use a plugin on the IndexManager class to change load order.
  • Specify the sortOrder in your indexer configuration.
  • Create a bash script to execute each indexer in the correct order.

Questão 5

Questão
In your phtml template file you need to output a URL inside a JavaScript context. var url = '<?= /* code here */ ?>'; Which two methods allow you to keep the output XSS-safe?
Responda
  • escapeUrl
  • escapeJs
  • escapeHtml
  • escapeHtmlAttr

Questão 6

Questão
You are working on a custom form in the Admin and the form is too lengthy. To organize the form better, you decide to group the fields into multiple tabs. How do you achieve this?
Responda
  • Add the fields into a <fieldset> node in the existing form in the ui_component XML file
  • Add a new form for the field group in the ui_component XML file
  • Add the fields into <tab> nodes in the customer_account_edit.xml layout file
  • Create a plugin for the method MyCompany\MyModule\Block\Adminhtml\Form\Edit\Tabs::toHtml()

Questão 7

Questão
You are making some changes to your existing action controller \MyCompany\MyModule\Controller\Index\Index public function __construct( \Magento\Framework\App\Action\Context $context, <new dependency here>, \Magento\Framework\View\Result\PageFactory $resultPageFactory){ You want to inject a new dependency to the controller, but you encounter the following error after flushing the cache and reloading the page: Recoverable Error: Argument 2 passed to MyCompany\MyModule\Controller\Index\Index::__construct() must be an instance of <new dependency class> ...How do you fix the error?
Responda
  • Remove the generated child class from generated/code that is calling the parent constructor with the old signature
  • Configure the new argument in di.xml for the controller class
  • Clean the config cache that contains all constructor signatures
  • New dependencies must be added at the end of the constructor signature because dependencies cannot be added in the middle of existing constructors

Questão 8

Questão
You are working with an OMS(Magento Order Management System ) that requires you to add an attribute to the order API. How do you add a field to the existing sales API?
Responda
  • You add an extension attribute to Magento\Sales\Api\Data\OrderInterface to include the new field
  • You update Magento\Sales\Api\OrderManagementInterface and Magento\Sales\Api\Data\OrderInterface to add your field
  • You create an install script to add a column to the sales table and Magento will automatically pull in the information
  • You create an etc/webapi.xml file and add the new field as an item to the route, as shown in the following code: <route url="/V1/orders" method="GET"> <service class= "Magento\Sales\Api\OrderRepositoryInterface" method="getList"> <item name="my_new_attribute" xsi:type="string" /> </service> <resources> <resource ref="Magento_Sales::sales" /> </resources> </route>

Questão 9

Questão
You are exploring the customer segment module and find this code in frontend/di.xml: <type name="Magento\Framework\View\Layout"> <plugin name="customer-segment-session-depersonalize" type= "Magento\CustomerSegment\Model\Layout\DepersonalizePlugin" sortOrder="15"/> </type> What effect does this plugin have for customer segments?
Responda
  • It cleans the segment and customer related entities from the session
  • It cleans the intermediate data of the segment-website and the segment-customer mapping in the tables to improve performance
  • It passes the segment information to the HttpContext from the customer session
  • It passes the segment information to the Knockout JS model from the customer session

Questão 10

Questão
Cross-site scripting, or XSS, is a security vulnerability that can be found in web applications, Magento extension developers should be aware of these vulnerabilities to avoid introducing them in their code. In Magento mainly three types of XSS vulnerabilities:
Responda
  • Persisted XSS
  • Reflected (non-persistent) XSS
  • DOM XSS
  • SQL Injection
  • Cross Site Scripting Admin

Questão 11

Questão
Magento Input Processing Any request data can be manipulated by attackers and can contain malicious values such as: (Select 4)
Responda
  • form fields filled with control characters (“<”, “>” etc)
  • headers containg false IDs
  • URIs contaings fake parts/query parameters
  • tampered cookies
  • tampered KnockoutJS
  • tampered Cache

Semelhante

PROFESSIONAL DEVELOPER TEST POOL-1 (MAGENTO 2 CERTIFIED )
Miska Red
SOLUTION SPECIALIST TEST-01 (MAGENTO 2 CERTIFIED )
Miska Red
Cloud Developer Exam Test-01(MAGENTO 2 CERTIFIED Professional )
Miska Red
PROFESSIONAL DEVELOPER TEST POOL-1 (MAGENTO 2 CERTIFIED )
Станислав Матявин
Magento 2 Cloud
Oleksiy P
PROFESSIONAL DEVELOPER TEST POOL-1 (MAGENTO 2 CERTIFIED )
Dario Dorfelli
MAGENTO 2 CERTIFIED SOLUTION SPECIALIST PRACTICE TEST
Pankaj Sharma
PROFESSIONAL DEVELOPER TEST POOL-1 (MAGENTO 2 CERTIFIED )
test test
SOLUTION SPECIALIST TEST-01 (MAGENTO 2 CERTIFIED )
Khrystyna Balog
Magento 2 Certified Professional Front End Developer Exam Questions
Benoit Alix
SIMULADÃO EA-HSG TRADIÇÕES, USOS, COSTUMES E LINGUAGEM DO MAR
isac rodrigues