In Vanilla you will see $this→CallDelegate(”whatever”) littered throughout controls and classes all through the Vanilla codebase. These CallDelegate methods are going to execute any functions that were written and attached in extensions way before these classes were ever even instantiated in the page. Below is a list of all the Delegates in Vanilla 1.1.2
/** * The ApplyForm_MyFunc function should be written in your extensions/MyExtension/default.php */ function ApplyForm_MyFunc(&$ApplyForm) { //Insert your code here. }
These delegates are listed in file library/People/People.Control.ApplyForm.php /** * Attach the ApplyForm_MyFunc function to these delegates like shown below. */ $Context->AddToDelegate('ApplyForm', 'Constructor', 'ApplyForm_MyFunc'); $Context->AddToDelegate('ApplyForm', 'PreCreateUser', 'ApplyForm_MyFunc'); $Context->AddToDelegate('ApplyForm', 'PostCreateUser', 'ApplyForm_MyFunc'); $Context->AddToDelegate('ApplyForm', 'LoadData', 'ApplyForm_MyFunc');
Notes: None
These delegates are listed in file library/People/People.Control.ApplyForm.php /** * Attach the ApplyForm_MyFunc function to the delegates like shown below. */ $Context->AddToDelegate('ApplyForm', 'PreNoPostBackRender', 'ApplyForm_MyFunc'); $Context->AddToDelegate('ApplyForm', 'PostNoPostBackRender', 'ApplyForm_MyFunc');
Notes: None
These delegates are listed in file library/People/People.Control.ApplyForm.php /** * Attach the ApplyForm_MyFunc function to the delegates like shown below. */ $Context->AddToDelegate('ApplyForm', 'PreValidPostBackRender', 'ApplyForm_MyFunc'); $Context->AddToDelegate('ApplyForm', 'PostValidPostBackRender', 'ApplyForm_MyFunc');
Notes: None
/** * The ApplicantsForm_MyFunc function should be written in your extensions/MyExtension/default.php */ function ApplicantsForm_MyFunc(&$ApplicantsForm) { //Insert your code here. }
These delegates are listed in file library/People/People.Control.ApplicantsForm.php /** * Attach the ApplicantsForm_MyFunc function to the delegates like shown below. */ $Context->AddToDelegate('ApplicantsForm', 'Constructor', 'ApplicantsForm_MyFunc');
Notes: None
These delegates are listed in file library/People/People.Control.ApplicantsForm.php /** * Attach the ApplicantsForm_MyFunc function to the delegates like shown below. */ $Context->AddToDelegate('ApplicantsForm', 'PreRender', 'ApplicantsForm_MyFunc'); $Context->AddToDelegate('ApplicantsForm', 'PostRender', 'ApplicantsForm_MyFunc');
Notes: None