PROFESSIONAL DEVELOPER PLUS TEST-01( MAGENTO 2 CERTIFIED )

Descripción

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
Test por Miska Red, actualizado hace más de 1 año
Miska Red
Creado por Miska Red hace casi 6 años
6089
5

Resumen del Recurso

Pregunta 1

Pregunta
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.
Respuesta
  • <?= $block->escapeJs($value) ?>
  • <?= $block->escapeJsVar($value) ?>
  • <?= $block->renderJs($value) ?>
  • <?= $block->escapeHtml($value) ?>

Pregunta 2

Pregunta
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?
Respuesta
  • 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.

Pregunta 3

Pregunta
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?
Respuesta
  • 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.

Pregunta 4

Pregunta
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?
Respuesta
  • 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.

Pregunta 5

Pregunta
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?
Respuesta
  • escapeUrl
  • escapeJs
  • escapeHtml
  • escapeHtmlAttr

Pregunta 6

Pregunta
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?
Respuesta
  • 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()

Pregunta 7

Pregunta
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?
Respuesta
  • 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

Pregunta 8

Pregunta
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?
Respuesta
  • 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>

Pregunta 9

Pregunta
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?
Respuesta
  • 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

Pregunta 10

Pregunta
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:
Respuesta
  • Persisted XSS
  • Reflected (non-persistent) XSS
  • DOM XSS
  • SQL Injection
  • Cross Site Scripting Admin

Pregunta 11

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

Similar

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
Magento 2 Cloud
Oleksiy P
PROFESSIONAL DEVELOPER TEST POOL-1 (MAGENTO 2 CERTIFIED )
Станислав Матявин
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
CIENCIAS AUXILIARES DE QUÍMICA ORGÁNICA
Luis Carrillo