<commit_before><?php
/**
 * TbGridView class file.
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 * @copyright Copyright &copy; <NAME> 2013-
 * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
 * @package bootstrap.widgets
 */

Yii::import('zii.widgets.grid.CGridView');
Yii::import('bootstrap.helpers.TbHtml');
Yii::import('bootstrap.widgets.TbDataColumn');

/**
 * Bootstrap Zii grid view.
 */
class TbGridView extends CGridView
{

	/**
	 * @var string|array the table type.
	 * Valid values are TbHtml::GRID_STRIPED, TbHtml::GRID_BORDERED, TbHtml::GRID_CONDENSED and/or TbHtml::GRID_HOVER
	 */
	public $type;

	/**
	 * @var string the CSS class name for the pager container. Defaults to 'pagination'.
	 */
	public $pagerCssClass = 'pagination';

	/**
	 * @var array the configuration for the pager.
	 * Defaults to <code>array('class'=>'ext.bootstrap.widgets.TbPager')</code>.
	 */
	public $pager = array('class' => 'bootstrap.widgets.TbPager');

	/**
	 * @var string the URL of the CSS file used by this grid view.
	 * Defaults to false, meaning that no CSS will be included.
	 */
	public $cssFile = false;

	/**
	 * Initializes the widget.
	 */
	public function init()
	{
		parent::init();

		$classes = array('table');

		if (isset($this->type) && !empty($this->type))
		{
			if (is_string($this->type))
				$this->type = explode(' ', $this->type);

			foreach ($this->type as $type)
			{
				if (in_array($type, TbHtml::$grids))
					$classes[] = 'table-' . $type;
			}
		}

		$this->htmlOptions = TbHtml::addClassName(implode(' ', $classes), $this->htmlOptions);
	}

	/**
	 * Creates column objects and initializes them.
	 */
	protected function initColumns()<commit_msg>Add classes to table tag not the grid view div<commit_after><?php
/**
 * TbGridView class file.
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 * @copyright Copyright &copy; <NAME> 2013-
 * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
 * @package bootstrap.widgets
 */

Yii::import('zii.widgets.grid.CGridView');
Yii::import('bootstrap.helpers.TbHtml');
Yii::import('bootstrap.widgets.TbDataColumn');

/**
 * Bootstrap Zii grid view.
 */
class TbGridView extends CGridView
{

	/**
	 * @var string|array the table type.
	 * Valid values are TbHtml::GRID_STRIPED, TbHtml::GRID_BORDERED, TbHtml::GRID_CONDENSED and/or TbHtml::GRID_HOVER
	 */
	public $type;

	/**
	 * @var string the CSS class name for the pager container. Defaults to 'pagination'.
	 */
	public $pagerCssClass = 'pagination';

	/**
	 * @var array the configuration for the pager.
	 * Defaults to <code>array('class'=>'ext.bootstrap.widgets.TbPager')</code>.
	 */
	public $pager = array('class' => 'bootstrap.widgets.TbPager');

	/**
	 * @var string the URL of the CSS file used by this grid view.
	 * Defaults to false, meaning that no CSS will be included.
	 */
	public $cssFile = false;

	/**
	 * Initializes the widget.
	 */
	public function init()
	{
		parent::init();

		$classes = array('table');

		if (isset($this->type) && !empty($this->type))
		{
			if (is_string($this->type))
				$this->type = explode(' ', $this->type);

			foreach ($this->type as $type)
			{
				if (in_array($type, TbHtml::$grids))
					$classes[] = 'table-' . $type;
			}
		}

		$this->itemsCssClass = implode(' ', $classes);
	}

	/**
	 * Creates column objects and initializes them.
	 */
	protected function initColumns()
{'fraction_non_alphanumeric': 0.1681751824817518, 'fraction_numerical': 0.0023357664233576644, 'mean_word_length': 3.7451523545706373, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 40, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '6502924', 'n_tokens_mistral': 1263, 'n_tokens_neox': 1123, 'n_words': 295}