| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php defined('SYSPATH') OR die('No direct script access.'); |
||
| 14 | public static function initialize(Jam_Meta $meta) |
||
| 15 | { |
||
| 16 | $meta |
||
| 17 | ->associations(array( |
||
| 18 | 'brand' => Jam::association('belongsto', array('inverse_of' => 'shipping_methods')), |
||
| 19 | 'shippings' => Jam::association('manytomany', array( |
||
| 20 | 'foreign_key' => 'method_id', |
||
| 21 | 'join_table' => 'shipping_groups', |
||
| 22 | 'readonly' => TRUE, |
||
| 23 | )), |
||
| 24 | 'shipping_groups' => Jam::association('hasmany', array('inverse_of' => 'method')), |
||
| 25 | )) |
||
| 26 | ->fields(array( |
||
| 27 | 'id' => Jam::field('primary'), |
||
| 28 | 'name' => Jam::field('string'), |
||
| 29 | )) |
||
| 30 | ->validator('name', array('present' => TRUE)); |
||
| 31 | } |
||
| 32 | } |
||
| 33 |