exam questions

Exam AD0-E717 All Questions

View all questions & answers for the AD0-E717 exam

Exam AD0-E717 topic 1 question 17 discussion

Actual exam question from Adobe's AD0-E717
Question #: 17
Topic #: 1
[All AD0-E717 Questions]

A developer found a bug inside a private method of a third party module class.
How can the developer override the method?

  • A. Create a custom class with corrected logic, and define the class as preference in the preferences.xml.
  • B. Create a custom class with the corrected logic, and define the class as a preference for original one in the di.xml.
  • C. Create a plugin, implement correct logic in the 'after' method, and then define the plugin in the di.xml.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Mujas
1 month ago
Selected Answer: B
There is no XML file as preferences.xml in Magento 2 and the plugins are only working for public methods not in private methods.
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago