<commit_before><?php
namespace Chamilo\Libraries\Format\Table\Extension\GalleryTable;

use Chamilo\Libraries\Format\Table\Extension\GalleryTable\Interfaces\GalleryTableOrderDirectionProhibition;
use Chamilo\Libraries\Format\Table\GalleryHTMLTable;
use Chamilo\Libraries\Format\Table\Table;
use Chamilo\Libraries\Format\Table\Interfaces\TableFormActionsSupport;
use Chamilo\Libraries\Format\Table\FormAction\TableFormActions;

/**
 * This class represents an table to display resources like thumbnails, images, videos...
 * Refactoring from GalleryObjectTable to support the new Table structure
 *
 * @author <NAME> - <NAME>
 */
abstract class GalleryTable extends Table
{
    /**
     * The default row count
     */
    const DEFAULT_COLUMN_COUNT = 4;

    const DEFAULT_ROW_COUNT = 5;

    /**
     * The current row that is being processed
     *
     * @var array
     */
    private $current_row;

    /**
     * **************************************************************************************************************
     * Inherited Rendering Functionality *
     * **************************************************************************************************************
     */

    /**
     * Initializes the table
     *
     * @return HTML_Table
     */
    protected function initialize_table()
    {
        $count = $this->get_default_row_count();

        $table = new GalleryHTMLTable(
            $this->get_name(),
            array($this, 'countData'),
            array($this, 'getData'),
            array($this, 'get_property_model'),
            0,
            $count,
            SORT_ASC,
            ! $this->prohibits_order_direction(),
            ! $this->prohibits_page_selection());

        if ($this->has_form_actions())
        {
            $table->setTableFormActions($this->get_form_actions());
        }

        $table->setAdditionalParameters($this->get_parameters());

        return $table;
    }

    /**
     * **************************************************************************************************************
     * Inherited Data Functionality *
     * **************************************************************************************************************
     */<commit_msg>[Core] Fixed a bug in the gallery table<commit_after><?php
namespace Chamilo\Libraries\Format\Table\Extension\GalleryTable;

use Chamilo\Libraries\Format\Table\Extension\GalleryTable\Interfaces\GalleryTableOrderDirectionProhibition;
use Chamilo\Libraries\Format\Table\GalleryHTMLTable;
use Chamilo\Libraries\Format\Table\Table;
use Chamilo\Libraries\Format\Table\Interfaces\TableFormActionsSupport;
use Chamilo\Libraries\Format\Table\FormAction\TableFormActions;

/**
 * This class represents an table to display resources like thumbnails, images, videos...
 * Refactoring from GalleryObjectTable to support the new Table structure
 *
 * @author <NAME> - Hogeschool Gent
 */
abstract class GalleryTable extends Table
{
    /**
     * The default row count
     */
    const DEFAULT_COLUMN_COUNT = 4;

    const DEFAULT_ROW_COUNT = 5;

    /**
     * The current row that is being processed
     *
     * @var array
     */
    private $current_row;

    /**
     * **************************************************************************************************************
     * Inherited Rendering Functionality *
     * **************************************************************************************************************
     */

    /**
     * Constructs the sortable table
     */
    protected function constructTable()
    {
        $count = $this->get_default_row_count();

        $this->table = new GalleryHTMLTable(
            $this->get_name(),
            array($this, 'countData'),
            array($this, 'getData'),
            array($this, 'get_property_model'),
            0,
            $count,
            SORT_ASC,
            ! $this->prohibits_order_direction(),
            ! $this->prohibits_page_selection());

        if ($this->has_form_actions())
        {
            $this->table->setTableFormActions($this->get_form_actions());
        }

        $this->table->setAdditionalParameters($this->get_parameters());
    }

    /**
     * Initializes the table
     *
     * @return HTML_Table
     */
    protected function initialize_table()
    {

    }

    /**
     * **************************************************************************************************************
     * Inherited Data Functionality *
     * **************************************************************************************************************
     */
{'fraction_non_alphanumeric': 0.2804825506247307, 'fraction_numerical': 0.0012925463162429987, 'mean_word_length': 3.2324521422060166, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3635650', 'n_tokens_mistral': 1160, 'n_tokens_neox': 1111, 'n_words': 213}