<commit_before><?php defined('SYSPATH') or die ('No direct script access.');

class Model_Nav extends ORM {
	
	//protected has one user
	protected $_has_one = array(
		'user' => array('model', 'user'),
	);
	
	protected $_has_many = array(
		'url' => array('model', 'url'),
	);
	
	protected $_belongs_to = array(
		'user' => array(),
	);
	
	protected $_created_column = array('column' => 'date_created', 'format' => TRUE);
	protected $_updated_column = array('column' => 'date_modified', 'format' => TRUE);
	
	public function rules()
	{
		
		return array(
			'nav_title' => array(
				array('not_empty'),
			),
		);
	}

	public function filters()
	{
		return array(
			'nav_title' => array(
				array('trim'),
			),
		);
	}
	
	public function labels()
	{
		return array(
			'id' => 'id',
			'nav_title' => 'Title',
		);
	}
	
	public function get_all()
	{
		return $this->order_by('date_created', 'desc')->find_all();
	}
	
	public function get_for_pulldown()
	{
		return $this->find_all()->as_array('id', 'nav_title');
	}
	
}<commit_msg>changed to plural for convention<commit_after><?php defined('SYSPATH') or die ('No direct script access.');

class Model_Nav extends ORM {
	
	//protected has one user
	protected $_has_one = array(
		'user' => array('model', 'user'),
	);
	
	protected $_has_many = array(
		'urls' => array('model', 'url'),
	);
	
	protected $_belongs_to = array(
		'user' => array(),
	);
	
	protected $_created_column = array('column' => 'date_created', 'format' => TRUE);
	protected $_updated_column = array('column' => 'date_modified', 'format' => TRUE);
	
	public function rules()
	{
		
		return array(
			'nav_title' => array(
				array('not_empty'),
			),
		);
	}

	public function filters()
	{
		return array(
			'nav_title' => array(
				array('trim'),
			),
		);
	}
	
	public function labels()
	{
		return array(
			'id' => 'id',
			'nav_title' => 'Title',
		);
	}
	
	public function get_all()
	{
		return $this->order_by('date_created', 'desc')->find_all();
	}
	
	public function get_for_pulldown()
	{
		return $this->find_all()->as_array('id', 'nav_title');
	}
	
}
{'fraction_non_alphanumeric': 0.18564593301435406, 'fraction_numerical': 0.0, 'mean_word_length': 3.7200902934537248, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6180398', 'n_tokens_mistral': 823, 'n_tokens_neox': 728, 'n_words': 168}