| | 318 | === Adding Components === |
| | 319 | |
| | 320 | Components (projected entities) can be defined in S3Models using the {{{add_component}}} method: |
| | 321 | |
| | 322 | {{{ |
| | 323 | current.s3db.add_component(<component_table_name>, <master_table_name>=<join>) |
| | 324 | }}} |
| | 325 | |
| | 326 | The {{{add_component()}}} method is available both in {{{S3Model}}} instances ({{{self.add_component}}}, {{{s3db.add_component}}}) as well as from the class ({{{S3Model.add_component}}}). |
| | 327 | |
| | 328 | Read more here: [wiki:S3/S3Model/ComponentResources Component Resources] |
| | 329 | |