Changeset 4014 for branches/0.10/manual

Show
Ignore:
Timestamp:
03/18/08 05:49:12 (10 months ago)
Author:
jwage
Message:

More documentation of plugins.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/0.10/manual/docs/en/plugins.txt

    r4013 r4014  
    187187        $this->hasColumn('deleted', 'boolean', 1); 
    188188    } 
     189     
    189190    public function preDelete($event) 
    190191    { 
    191192        $event->skipOperation(); 
    192193    } 
     194     
    193195    public function postDelete($event) 
    194196    { 
     
    218220We start this task by creating a plugin called EmailPlugin with setTableDefinition() method. Inside the setTableDefinition() method various helper methods can be used for easily creating the dynamic record definition. Commonly the following methods are being used: 
    219221 
    220 buildForeignKeys() 
     222public function initOptions() 
     223public function buildLocalRelation() 
     224public function buildForeignKeys(Doctrine_Table $table) 
     225public function buildForeignRelation($alias = null) 
     226public function buildRelation() // calls buildForeignRelation() and buildLocalRelation() 
    221227 
    222228<code type="php"> 
     
    226232    { 
    227233        $this->setOption('className', '%CLASS%Email'); 
     234    } 
     235 
     236    public function buildRelation() 
     237    { 
     238          $this->buildForeignRelation('Emails'); 
     239        $this->buildLocalRelation(); 
    228240    } 
    229241