__construct() public method

Creates filtered table representation.
public __construct ( Context $context, Nette\Database\IConventions $conventions, $tableName, Nette\Caching\IStorage $cacheStorage = NULL )
$context Nette\Database\Context
$conventions Nette\Database\IConventions
$cacheStorage Nette\Caching\IStorage
Example #1
0
 public function __construct($name, Selection $refTable, $column)
 {
     parent::__construct($name, $refTable->connection);
     $this->refTable = $refTable;
     $this->column = $column;
     $this->delimitedColumn = $this->connection->getSupplementalDriver()->delimite($this->column);
 }
Example #2
0
 /**
  * @param  string
  * @param  IModelManager
  */
 public function __construct($table, IModelManager $manager)
 {
     if (NETTE_VERSION_ID >= 20100) {
         parent::__construct($manager->getConnection(), $table, $manager->getDatabaseReflection(), $manager->getCacheStorage());
     } else {
         parent::__construct($table, $manager->getConnection());
     }
     $this->manager = $manager;
 }
Example #3
0
 public function __construct(Connection $connection, \Nette\DI\Container $context, \Nette\Database\IReflection $reflection)
 {
     parent::__construct($connection, 'event_time', $reflection);
     $this->select('event_time.*');
     $this->select('DATEDIFF(event_time.date_from, CURDATE()) AS diff_date_from');
     $this->select('DATEDIFF(event_time.date_to, CURDATE()) AS diff_date_to');
     $this->select('DATEDIFF(event_time.date_to, event_time.date_from) AS diff_dates');
     $this->context = $context;
 }
Example #4
0
 public function __construct(Connection $connection, \Nette\DI\Container $context, \Nette\Database\IReflection $reflection, \Nette\Caching\Cache $cache)
 {
     parent::__construct($connection, 'event_time_all', $reflection);
     $this->context = $context;
     $this->cache = $cache;
     $this->select('event_time_all.*');
     $this->select('DATEDIFF(event_time.date_from, CURDATE()) AS diff_date_from');
     $this->select('DATEDIFF(event_time.date_to, CURDATE()) AS diff_date_to');
     $this->select('DATEDIFF(event_time.date_to, event_time.date_from) AS diff_dates');
     $this->select('event_time.event.visible');
     $this->select('event_time.event.approved');
     $this->select('event_time.event_id');
 }
Example #5
0
 public function __construct(\Nette\Database\Context $database)
 {
     parent::__construct($database, $database->getConventions(), $this->table);
     $this->db = $database;
 }
Example #6
0
 public function __construct(Connection $connection, \Nette\DI\Container $context, \Nette\Database\IReflection $reflection)
 {
     parent::__construct($connection, 'page', $reflection);
     $this->context = $context;
 }
Example #7
0
 /**
  * Creates filtered and grouped table representation.
  * @param  Selection  $refTable
  * @param  string  database table name
  * @param  string  joining column
  */
 public function __construct(Selection $refTable, $table, $column)
 {
     parent::__construct($table, $refTable->connection);
     $this->refTable = $refTable;
     $this->column = $column;
 }
 /**
  * Creates filtered and grouped table representation.
  * @param  Context
  * @param  IConventions
  * @param  string  database table name
  * @param  string  joining column
  * @param  Selection
  * @param  Nette\Caching\IStorage|NULL
  */
 public function __construct(Context $context, IConventions $conventions, $tableName, $column, Selection $refTable, Nette\Caching\IStorage $cacheStorage = NULL)
 {
     $this->refTable = $refTable;
     $this->column = $column;
     parent::__construct($context, $conventions, $tableName, $cacheStorage);
 }
Example #9
0
 public function __construct($name, Selection $refTable, $column)
 {
     parent::__construct($name, $refTable->connection);
     $this->refTable = $refTable;
     $this->through($column);
 }
Example #10
0
 public function __construct(Connection $connection, \Nette\DI\Container $context, \Nette\Database\IReflection $reflection)
 {
     parent::__construct($connection, 'shire', $reflection);
 }
Example #11
0
 /**
  * Creates filtered and grouped table representation.
  * @param  Selection  $refTable
  * @param  string  database table name
  * @param  string  joining column
  */
 public function __construct(Selection $refTable, $table, $column)
 {
     $this->refTable = $refTable;
     $this->column = $column;
     parent::__construct($refTable->connection, $table, $refTable->reflection, $refTable->cache ? $refTable->cache->getStorage() : NULL);
 }
Example #12
0
Selection{protected$refTable;protected$column;protected$delimitedColumn;protected$active;protected$referencing;protected$aggregation=array();function
__construct($name,Selection$refTable,$column){parent::__construct($name,$refTable->connection);$this->refTable=$refTable;$this->column=$column;$this->delimitedColumn=$this->connection->getSupplementalDriver()->delimite($this->column);}function
Example #13
0
 public function __construct(Connection $connection, \Nette\DI\Container $context, \Nette\Database\IReflection $reflection, Nette\Caching\IStorage $cacheStorage)
 {
     parent::__construct($connection, 'event', $reflection, $cacheStorage);
     $this->context = $context;
 }
Example #14
0
 public function __construct($table, Nette\Database\Context $context)
 {
     parent::__construct($context->getConnection(), $table, $context->getDatabaseReflection());
 }