Conditions | 1 |
Paths | 1 |
Total Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php defined('SYSPATH') OR die('No direct access allowed.'); |
||
14 | public static function initialize(Jam_Meta $meta) |
||
15 | { |
||
16 | $meta |
||
17 | ->name_key('name') |
||
18 | |||
19 | ->fields(array( |
||
20 | 'id' => Jam::field('primary'), |
||
21 | 'name' => Jam::field('string'), |
||
22 | 'description' => Jam::field('string'), |
||
23 | )) |
||
24 | |||
25 | ->associations(array( |
||
26 | 'users' => Jam::association('manytomany'), |
||
27 | )) |
||
28 | |||
29 | ->validator('name', array('present' => TRUE, 'length' => array('minimum' => 4, 'maximum' => 32), 'unique' => TRUE)) |
||
30 | ->validator('description', array('length' => array('maximum' => 255))); |
||
31 | |||
32 | } |
||
33 | } // End Kohana_Model_Auth_Role |