Changeset 4014 for branches/0.10/manual
- Timestamp:
- 03/18/08 05:49:12 (10 months ago)
- Files:
-
- 1 modified
-
branches/0.10/manual/docs/en/plugins.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/0.10/manual/docs/en/plugins.txt
r4013 r4014 187 187 $this->hasColumn('deleted', 'boolean', 1); 188 188 } 189 189 190 public function preDelete($event) 190 191 { 191 192 $event->skipOperation(); 192 193 } 194 193 195 public function postDelete($event) 194 196 { … … 218 220 We 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: 219 221 220 buildForeignKeys() 222 public function initOptions() 223 public function buildLocalRelation() 224 public function buildForeignKeys(Doctrine_Table $table) 225 public function buildForeignRelation($alias = null) 226 public function buildRelation() // calls buildForeignRelation() and buildLocalRelation() 221 227 222 228 <code type="php"> … … 226 232 { 227 233 $this->setOption('className', '%CLASS%Email'); 234 } 235 236 public function buildRelation() 237 { 238 $this->buildForeignRelation('Emails'); 239 $this->buildLocalRelation(); 228 240 } 229 241