Vanilla 1 Documentation Archive

 
 
vanilla:development:listofdelegates
Table of Contents

List of Delegates

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

Controls

ApplyForm

Delegation Function

/** 
 * The ApplyForm_MyFunc function should be written in your extensions/MyExtension/default.php
 */
function ApplyForm_MyFunc(&$ApplyForm) {
         //Insert your code here.
}

Constructor Delegates

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

Render_NoPostBack Delegates

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

Render_ValidPostBack Delegates

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

ApplicationForm

Delegation Function

/** 
 * The ApplicantsForm_MyFunc function should be written in your extensions/MyExtension/default.php
 */
function ApplicantsForm_MyFunc(&$ApplicantsForm) {
         //Insert your code here.
}

Constructor Delegates

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

Render Delegates

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

Classes

 
 
 
 
vanilla/development/listofdelegates.txt · Last modified: 2009/03/28 14:19
Vanilla 1 Documentation archive (Wiki by DokuWiki)