hc_modules->exists('notes') ) { $config['note']['has_one']['timeoff'] = array( 'class' => 'timeoff_model', 'other_field' => 'note', ); $config['note']['has_one']['shift'] = array( 'class' => 'shift_model', 'other_field' => 'note', ); $config['timeoff']['has_many']['note'] = array( 'class' => 'note_model', 'other_field' => 'timeoff', ); $config['shift']['has_many']['note'] = array( 'class' => 'note_model', 'other_field' => 'shift', ); $config['user']['has_many']['note'] = array( 'class' => 'note_model', 'other_field' => 'author', ); } if( $CI->hc_modules->exists('shift_trades') ) { $config['shift']['has_one']['trade'] = array( 'class' => 'trade_model', 'other_field' => 'shift', ); $config['user']['has_many']['trade'] = array( 'class' => 'trade_model', 'other_field' => 'to_user', ); }