Esempio n. 1
0
 public function renderDefault()
 {
     $this->context->addService('testDatabase', '@databaseShare');
     \Nette\Diagnostics\FireLogger::log('555555555555555555555555555');
     \Nette\Diagnostics\FireLogger::log($this->context->testDatabase);
     $this->template->asd = $this->context->page->getPage('asd');
     \Nette\Diagnostics\FireLogger::log($this->context);
     $this->template->setSource('CCCC');
     $this->template->setFile(APP_DIR . '/templates/umcaca.latte');
 }
Esempio n. 2
0
 /**
  * Constructs URL path from PresenterRequest object.
  * @param  Nette\Web\IHttpRequest
  * @param  PresenterRequest
  * @return string|NULL
  */
 public function constructUrl(PresenterRequest $request, IHttpRequest $context)
 {
     \Nette\Diagnostics\FireLogger::log('oooooooooooooo');
     return NULL;
     // overime ze presenter je jeden ze podporovanych a existuje parameter 'id'
     static $presenters = array('Front:Spot' => TRUE, 'Front:Category' => TRUE, 'Front:Product' => TRUE);
     if (!isset($presenters[$request->getPresenterName()])) {
         return NULL;
     }
     $params = $request->getParams();
     if (!isset($params['id'])) {
         return NULL;
     }
     // vse ok, generuj URL
     $uri = $context->getUri()->basePath . rawurlencode($params['id']);
     unset($params['id'], $params['action']);
     $query = http_build_query($params, '', '&');
     if ($query !== '') {
         $uri .= '?' . $query;
     }
     return $uri;
 }
 /**
  * Sends message to FireLogger console.
  * @param  mixed   message to log
  * @return bool    was successful?
  */
 public static function fireLog($message)
 {
     if (!self::$productionMode) {
         return self::$fireLogger->log($message);
     }
 }
Esempio n. 4
0
 public function getUrlById($id)
 {
     \Nette\Diagnostics\FireLogger::log($id);
     return null;
 }
Esempio n. 5
0
 public function __construct(Nette\Database\Connection $db)
 {
     \Nette\Diagnostics\FireLogger::log('XXXXXX');
     $this->connection = $db;
 }