private function build_table()
 {
     $table_model = new HTMLTableModel('table', array(new HTMLTableColumn($this->lang['smiley']), new HTMLTableColumn(LangLoader::get_message('code', 'main')), new HTMLTableColumn('')), new HTMLTableSortingRule(''), HTMLTableModel::NO_PAGINATION);
     $table = new HTMLTable($table_model);
     $table_model->set_caption($this->lang['smiley_management']);
     $results = array();
     foreach (SmileysCache::load()->get_smileys() as $code => $row) {
         $edit_link = new LinkHTMLElement(AdminSmileysUrlBuilder::edit($row['idsmiley']), '', array('title' => LangLoader::get_message('edit', 'common')), 'fa fa-edit');
         $delete_link = new LinkHTMLElement(AdminSmileysUrlBuilder::delete($row['idsmiley']), '', array('title' => LangLoader::get_message('delete', 'common'), 'data-confirmation' => 'delete-element'), 'fa fa-delete');
         $results[] = new HTMLTableRow(array(new HTMLTableRowCell(new ImgHTMLElement(Url::to_rel('/images/smileys/') . $row['url_smiley'], array('id' => 'smiley-' . $row['idsmiley'] . '-img', 'alt' => ''))), new HTMLTableRowCell($code), new HTMLTableRowCell($edit_link->display() . $delete_link->display())));
     }
     $table->set_rows(count($results), $results);
     $this->view->put('table', $table->display());
 }
 private function build_table()
 {
     $errors = $this->get_errors_list();
     $types = array('question' => 'error.unknow', 'notice' => 'error.notice', 'warning' => 'error.warning', 'error' => 'error.fatal');
     $table_model = new HTMLTableModel('table', array(new HTMLTableColumn(LangLoader::get_message('date', 'date-common'), '', 'col-large'), new HTMLTableColumn(LangLoader::get_message('description', 'main'))), new HTMLTableSortingRule(''), self::NUMBER_ITEMS_PER_PAGE);
     $table = new HTMLTable($table_model, 'table-fixed error-list');
     $table_model->set_caption($this->lang['logged_errors_list']);
     $br = new BrHTMLElement();
     $results = array();
     foreach ($errors as $error) {
         $error_class = new SpanHTMLElement(LangLoader::get_message($types[$error['errclass']], 'status-messages-common') . ' : ', array(), 'text-strong');
         $error_stacktrace = new SpanHTMLElement(strip_tags($error['errstacktrace'], '<br>'), array(), 'text-italic');
         $error_message = $error_class->display() . strip_tags($error['errmsg'], '<br>') . $br->display() . $br->display() . $br->display() . $error_stacktrace->display();
         $results[] = new HTMLTableRow(array(new HTMLTableRowCell($error['errdate']), new HTMLTableRowCell(new DivHTMLElement($error_message, array(), $error['errclass']))));
     }
     $results_number = count($results);
     $table->set_rows($results_number, $results);
     if ($results_number) {
         $this->view->put_all(array('FORM' => $this->build_form()->display(), 'table' => $table->display()));
     } else {
         $this->view->put('MSG', MessageHelper::display(LangLoader::get_message('no_item_now', 'common'), MessageHelper::SUCCESS, 0, true));
     }
 }