Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

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 (?) , you can switch to a simple comment.
Switch to a voting comment New
Mujas
5 months, 3 weeks 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 ...