/**
  * @param int $qid
  *
  * @return string
  */
 public function edit($qid)
 {
     $question = Facade::load('questions', $qid);
     if (!$question->isEmpty()) {
         $answers = Facade::getAll('SELECT * FROM answers WHERE qid=? ORDER BY id', array($qid));
         return $this->factory->getTwigAdminObj()->render('edit_poll.html', array('qid' => $qid, 'question' => $question->question, 'answers' => $answers));
     } else {
         return General::ref('index.php');
     }
 }
 /**
  *
  */
 public function checkIsLoggedIn()
 {
     if (!$this->isLoggedIn()) {
         echo General::ref($this->factory->getLoginObj()->getIndexPage());
     }
 }
 /**
  * @return void
  */
 public function checkCache()
 {
     if ($this->getSiteCache() == 1) {
         $this->factory->getTwigAdminObj()->setCache('../cache');
     }
 }