function __construct($id = NULL) { $fields = array('label' => new Type\CharField(), 'cat' => new Type\CharField(), 'active' => new Type\BooleanField(), 'parent' => new Type\ForeignKey('FelixOnline\\Core\\Category'), 'email' => new Type\CharField(), 'twitter' => new Type\CharField(), 'description' => new Type\TextField(), 'order' => new Type\IntegerField(), 'hidden' => new Type\BooleanField(), 'secret' => new Type\BooleanField()); parent::__construct($fields, $id); $currentuser = new CurrentUser(); if ($this->getSecret() && !$currentuser->isLoggedIn() && !Utility::isInCollege()) { throw new \FelixOnline\Exceptions\ModelNotFoundException("This is a secret category and you don't have permission to access it", "Category", $id); } }
function __construct($id = NULL) { $fields = array('advert' => new Type\ForeignKey('FelixOnline\\Core\\Advert'), 'category' => new Type\ForeignKey('FelixOnline\\Core\\Category')); parent::__construct($fields, $id); }
function __construct($id = NULL) { $fields = array('email' => new Type\CharField(), 'code' => new Type\CharField(), 'confirmed' => new Type\BooleanField()); parent::__construct($fields, $id, null, true); }
function __construct($id = NULL) { $fields = array('topic' => new Type\ForeignKey('FelixOnline\\Core\\Topic'), 'article' => new Type\ForeignKey('FelixOnline\\Core\\Article')); parent::__construct($fields, $id); }
function __construct($id = NULL) { $fields = array('comment_id' => new Type\ForeignKey('FelixOnline\\Core\\Comment'), 'timestamp' => new Type\DateTimeField(), 'action' => new Type\CharField(), 'is_spam' => new Type\BooleanField(), 'error' => new Type\TextField()); parent::__construct($fields, $id, null, true); }
/** * Constructor for Text class * * $id - ID of text (optional) */ function __construct($id = NULL) { $fields = array('slug' => new Type\CharField(array('primary' => true)), 'name' => new Type\CharField(), 'text' => new Type\TextField(), 'disabled' => new Type\BooleanField(), 'image' => new Type\ForeignKey('FelixOnline\\Core\\Image')); parent::__construct($fields, $id); }
function __construct($id = NULL) { $fields = array('user' => new Type\ForeignKey('FelixOnline\\Core\\User'), 'role' => new Type\ForeignKey('FelixOnline\\Core\\Role')); parent::__construct($fields, $id); }
function __construct($id = NULL) { $fields = array('details' => new Type\CharField(), 'image' => new Type\ForeignKey('FelixOnline\\Core\\Image'), 'url' => new Type\CharField(), 'start_date' => new Type\DateTimeField(), 'end_date' => new Type\DateTimeField(), 'max_impressions' => new Type\IntegerField(), 'views' => new Type\IntegerField(), 'clicks' => new Type\IntegerField(), 'frontpage' => new Type\BooleanField(), 'categories' => new Type\BooleanField(), 'articles' => new Type\BooleanField(), 'sidebar' => new Type\BooleanField()); parent::__construct($fields, $id); }
function __construct($id = NULL) { $fields = array('author' => new Type\ForeignKey('FelixOnline\\Core\\User'), 'content' => new Type\TextField(), 'start_time' => new Type\DateTimeField(), 'end_time' => new Type\DateTimeField(), 'hidden' => new Type\BooleanField(array('null' => false)), 'frontpage' => new Type\BooleanField(array('null' => false)), 'sort_order' => new Type\IntegerField()); parent::__construct($fields, $id); }
function __construct($id = NULL) { $fields = array('author' => new Type\ForeignKey('FelixOnline\\Core\\User'), 'question' => new Type\TextField(), 'ended' => new Type\BooleanField(array('null' => false)), 'location' => new Type\ForeignKey('FelixOnline\\Core\\PollLocation'), 'hide_results' => new Type\BooleanField(array('null' => false))); parent::__construct($fields, $id); }
/** * Constructor for Image class * If initialised with id then store relevant data in object * * $id - ID of image (optional) * * Returns image object */ function __construct($id = NULL) { $fields = array('title' => new Type\CharField(), 'uri' => new Type\CharField(), 'user' => new Type\ForeignKey('FelixOnline\\Core\\User'), 'description' => new Type\CharField(), 'timestamp' => new Type\DateTimeField(), 'attribution' => new Type\CharField(), 'attr_link' => new Type\CharField(), 'width' => new Type\IntegerField(), 'height' => new Type\IntegerField()); parent::__construct($fields, $id); }
function __construct($uname = NULL) { $fields = array('user' => new Type\CharField(array('primary' => true)), 'name' => new Type\CharField(), 'visits' => new Type\IntegerField(array('dont_log' => true)), 'ip' => new Type\CharField(array('dont_log' => true)), 'timestamp' => new Type\DateTimeField(array('dont_log' => true)), 'info' => new Type\TextField(), 'description' => new Type\TextField(array('transformers' => array(Type\BaseType::TRANSFORMER_NO_HTML))), 'email' => new Type\CharField(array('transformers' => array(Type\BaseType::TRANSFORMER_NO_HTML))), 'facebook' => new Type\CharField(array('transformers' => array(Type\BaseType::TRANSFORMER_NO_HTML))), 'twitter' => new Type\CharField(array('transformers' => array(Type\BaseType::TRANSFORMER_NO_HTML))), 'websitename' => new Type\CharField(array('transformers' => array(Type\BaseType::TRANSFORMER_NO_HTML))), 'websiteurl' => new Type\CharField(array('transformers' => array(Type\BaseType::TRANSFORMER_NO_HTML))), 'image' => new Type\ForeignKey('FelixOnline\\Core\\Image'), 'show_email' => new Type\BooleanField(), 'show_ldap' => new Type\BooleanField()); parent::__construct($fields, $uname); }
function __construct($key = NULL) { $fields = array('setting' => new Type\CharField(array('primary' => true)), 'description' => new Type\CharField(), 'value' => new Type\CharField()); parent::__construct($fields, $key); }
/** * Constructor for Comment class * If initialised with an id then store relevant data * Do nothing if not * * $id - ID of comment * * Returns comment object. */ public function __construct($id = NULL) { // common fields $fields = array('article' => new Type\ForeignKey('FelixOnline\\Core\\Article'), 'user' => new Type\ForeignKey('FelixOnline\\Core\\User'), 'name' => new Type\CharField(array('transformers' => array(Type\BaseType::TRANSFORMER_NO_HTML))), 'comment' => new Type\TextField(array('transformers' => array(Type\BaseType::TRANSFORMER_NO_HTML))), 'timestamp' => new Type\DateTimeField(), 'ip' => new Type\CharField(), 'email' => new Type\CharField(), 'useragent' => new Type\CharField(), 'referer' => new Type\CharField(), 'active' => new Type\BooleanField(), 'pending' => new Type\BooleanField(), 'spam' => new Type\BooleanField(), 'reply' => new Type\ForeignKey('FelixOnline\\Core\\Comment'), 'likes' => new Type\IntegerField(array('null' => false)), 'dislikes' => new Type\IntegerField(array('null' => false))); parent::__construct($fields, $id); }
function __construct($id = NULL) { $fields = array('name' => new Type\CharField(), 'description' => new Type\CharField(), 'parent' => new Type\ForeignKey('FelixOnline\\Core\\Role')); parent::__construct($fields, $id); }
function __construct($id = NULL) { $fields = array('poll' => new Type\ForeignKey('FelixOnline\\Core\\Poll'), 'option' => new Type\ForeignKey('FelixOnline\\Core\\PollOption'), 'ip' => new Type\TextField(), 'useragent' => new Type\TextField()); parent::__construct($fields, $id, null, true); }
function __construct($id = NULL) { $fields = array('timestamp' => new Type\DateTimeField(), 'table' => new Type\CharField(), 'key' => new Type\CharField(), 'user' => new Type\CharField(), 'action' => new Type\CharField(), 'fields' => new Type\TextField()); parent::__construct($fields, $id, null, true); }
function __construct($id = NULL) { $fields = array('poll' => new Type\ForeignKey('FelixOnline\\Core\\Poll'), 'text' => new Type\TextField()); parent::__construct($fields, $id); }
/** * Constructor for Text class * * $id - ID of text (optional) */ function __construct($id = NULL) { $fields = array('user' => new Type\ForeignKey('FelixOnline\\Core\\User'), 'content' => new Type\TextField(), 'timestamp' => new Type\DateTimeField(), 'converted' => new Type\BooleanField()); parent::__construct($fields, $id); }