Beispiel #1
0
 /**
  * @param KConfig $config
  */
 public function __construct(KConfig $config)
 {
     parent::__construct($config);
     if (empty($config->relation_table)) {
         throw new KDatabaseTableException('Relation table cannot be empty');
     }
     $this->setRelationTable($config->relation_table);
 }
Beispiel #2
0
 public function __construct(KConfig $config)
 {
     parent::__construct($config);
     //Make sure the email and username fields are unique
     $this->getColumn('email')->unique = true;
     $this->getColumn('username')->unique = true;
     $this->getColumn('users_group_id')->default = 0;
     $this->getColumn('enabled')->default = 1;
 }
Beispiel #3
0
 public function __construct(KConfig $config)
 {
     $config->append(array('filters' => array('params' => 'json'), 'behaviors' => array('orderable')));
     parent::__construct($config);
     $this->_xml_path = $config->xml_path;
     foreach ($this->getColumns() as $field) {
         if ($field->name == 'default') {
             $field->unique = 1;
             break;
         }
     }
 }
Beispiel #4
0
 /**
  * Constructor
  *
  * @param 	object 	An optional KConfig object with configuration options
  */
 public function __construct(KConfig $config)
 {
     $config->name = 'ninjaboard_forums';
     $nestable = KFactory::tmp('admin::com.ninja.database.behavior.nestable');
     $orderable = KFactory::tmp('admin::com.ninjaboard.database.behavior.orderable');
     //$configurable		  = KFactory::tmp('admin::com.ninjaboard.behavior.configurable');
     $config->behaviors = array($orderable, $nestable);
     $config->filters = array('params' => 'json');
     parent::__construct($config);
     //@TODO change the default value to '/' in the table schema later.
     $fields = $this->getColumns();
     $fields['path']->default = '/';
 }
Beispiel #5
0
 public function __construct(KConfig $config)
 {
     parent::__construct($config);
     // Set the table for multilingual purposes.
     $lang_tag = JFactory::getLanguage()->getTag();
     $parts = explode('-', $lang_tag);
     $lang = $parts[0];
     $base = 'featured_nodes';
     $table = ($lang != 'en' ? $lang . '_' : '') . $base;
     try {
         $this->getDatabase()->getTableSchema($table);
     } catch (Exception $e) {
         // The table doesn't exist, so reset it.
         $table = $base;
     }
     $this->_base = $table;
     $this->_name = $table;
 }
Beispiel #6
0
 /**
  * Constructor
  *
  * @param 	object 	An optional KConfig object with configuration options
  */
 public function __construct(KConfig $config)
 {
     $config->append(array('filters' => array('text' => 'raw'), 'behaviors' => array('creatable')));
     parent::__construct($config);
 }
Beispiel #7
0
 /**
  * Constructor
  *
  * @param 	object 	An optional KConfig object with configuration options
  */
 public function __construct(KConfig $config = null)
 {
     $config->append(array('filters' => array('params' => 'json'), 'behaviors' => array('hittable')));
     parent::__construct($config);
 }
Beispiel #8
0
 public function __construct(KConfig $config)
 {
     parent::__construct($config);
     $this->getColumn('email')->unique = true;
     $this->getColumn('username')->unique = true;
 }
Beispiel #9
0
 /**
  * Constructor
  *
  * @param 	object 	An optional KConfig object with configuration options
  */
 public function __construct(KConfig $config)
 {
     $config->append(array('name' => 'ninjaboard_log_topic_reads', 'behaviors' => array('creatable')));
     parent::__construct($config);
 }
 /**
  * Constructor
  *
  * @param 	object 	An optional KConfig object with configuration options
  */
 public function __construct(KConfig $options)
 {
     $options->name = 'ninjaboard_joomla_user_group_maps';
     $options->identity_column = 'joomla_gid';
     parent::__construct($options);
 }
Beispiel #11
0
 /**
  * Constructor
  *
  * @param 	object 	An optional KConfig object with configuration options
  */
 public function __construct(KConfig $config)
 {
     $config->identity_column = 'ninjaboard_person_id';
     parent::__construct($config);
 }
Beispiel #12
0
 /**
  * Constructor
  *
  * @param 	object 	An optional KConfig object with configuration options
  */
 public function __construct(KConfig $config)
 {
     $config->append(array('filters' => array('text' => 'raw', 'params' => 'json'), 'behaviors' => array('creatable', 'modifiable', KFactory::tmp('site::com.ninjaboard.database.behavior.postable'))));
     parent::__construct($config);
     $this->_column_map = array_merge($this->_column_map, array('created_by' => 'created_user_id', 'created_on' => 'created_time', 'modified_by' => 'modified_user_id', 'modified_on' => 'modified'));
 }
Beispiel #13
0
 /**
  * Constructor
  *
  * @param 	object 	An optional KConfig object with configuration options
  */
 public function __construct(KConfig $config)
 {
     parent::__construct($config);
     $this->_column_map = array_merge($this->_column_map, array('name' => 'params', 'post' => 'post_id'));
 }