1.

How many events does the BaseFieldType provide?(a) 1(b) 2(c) 3(d) 4The question was asked by my college director while I was bunking the class.This intriguing question comes from Crafting the Public API topic in division Parsing, Benchmarking and Logging of JavaScript

Answer»

The correct answer is (c) 3

Explanation: BaseFieldType provides three events that you can LATCH code ONTO:

onBeforeSave() : CALLED RIGHT before a field is saved.

onAfterSave() : Called right after a field is saved, and $this->model->id is set.

onAfterElementSave() : Called right after an element is saved, and $this->element->id is set.



Discussion

No Comment Found

Related InterviewSolutions