Exemple #1
0
 /**
  * @param Context $db
  * @param Selection $selection
  */
 public function __construct(Context $db, Selection $selection)
 {
     parent::__construct();
     $this->db = $db;
     $this->selection = $selection;
     $this->prepare();
 }
Exemple #2
0
 public function __construct($parent, $name)
 {
     parent::__construct($parent, $name);
     $this->user = $parent->user->getIdentity();
     $this->settings = $this->user->settings;
     $this->setTranslator(new \Grido\Translations\FileTranslator('cs'));
     //$this->setDefaultPerPage($this->settings["table_rows"]);
     $this->tablePrototype = \Nette\Utils\Html::el('table');
     $this->tablePrototype->id($this->getName())->class[] = 'table table-striped table-hover';
     $this->setExport();
 }
Exemple #3
0
 /**
  *
  * @param \Nette\ComponentModel\IContainer $parent
  * @param string $name
  */
 public function __construct(\Nette\ComponentModel\IContainer $parent = NULL, $name = NULL)
 {
     parent::__construct($parent, $name);
     $translator = $parent->translator;
     if ($translator instanceof \Kdyby\Translation\Translator) {
         $lang = $translator->getLocale();
         $gridLang = $lang === 'cz' ? 'cs' : 'en';
         $this->getTranslator()->setLang($gridLang);
     }
     $this->setTemplateFile(__DIR__ . '/templates/fresh.latte');
     $this->getTemplate()->extendsFile = DIR_VENDOR . '/o5/grido/src/templates/default.latte';
     $this->filterRenderType = Filter::RENDER_INNER;
     $this->setExport();
 }