# DebugDataColumn

> Applies accessible defaults to debug GridView data columns.

[API reference](/docs/api/index.md) › [Debug](/docs/extensions/debug/reference/index.md) › [widgets](/docs/extensions/debug/reference/widgets/index.md) › DebugDataColumn

| final class | `yii\debug\widgets\DebugDataColumn` |
| --- | --- |
| Extends | [`yii\grid\DataColumn`](/docs/api/yii/grid/datacolumn/index.md) » [`yii\grid\Column`](/docs/api/yii/grid/column/index.md) » [`yii\base\BaseObject`](/docs/api/yii/base/baseobject/index.md) |
| Implements | [`yii\base\Configurable`](/docs/api/yii/base/configurable/index.md) |
| Source | [`src/widgets/DebugDataColumn.php`](https://github.com/yii2-extensions/debug/blob/main/src/widgets/DebugDataColumn.php#L13) |

Applies accessible defaults to debug GridView data columns.

## Properties

| Property | Type | Description | Defined by |
| --- | --- | --- | --- |
| <span id="property-attribute"></span>[`$attribute`](/docs/api/yii/grid/datacolumn/index.md#property-attribute) | `string` | The attribute name associated with this column. Default: `null`. | [`yii\grid\DataColumn`](/docs/api/yii/grid/datacolumn/index.md) |
| <span id="property-content"></span>[`$content`](/docs/api/yii/grid/column/index.md#property-content) | `callable` | This is a callable that will be used to generate the content of each cell. Default: `null`. | [`yii\grid\Column`](/docs/api/yii/grid/column/index.md) |
| <span id="property-contentOptions"></span>[`$contentOptions`](/docs/api/yii/grid/column/index.md#property-contentOptions) | `array\|`[`Closure`](https://www.php.net/manual/en/class.closure.php) | The HTML attributes for the data cell tag. Default: `[]`. | [`yii\grid\Column`](/docs/api/yii/grid/column/index.md) |
| <span id="property-enableSorting"></span>[`$enableSorting`](/docs/api/yii/grid/datacolumn/index.md#property-enableSorting) | `bool` | Whether to allow sorting by this column. Default: `true`. | [`yii\grid\DataColumn`](/docs/api/yii/grid/datacolumn/index.md) |
| <span id="property-encodeLabel"></span>[`$encodeLabel`](/docs/api/yii/grid/datacolumn/index.md#property-encodeLabel) | `bool` | Whether the header label should be HTML-encoded. Default: `true`. Available since 2.0.1. | [`yii\grid\DataColumn`](/docs/api/yii/grid/datacolumn/index.md) |
| <span id="property-filter"></span>[`$filter`](/docs/api/yii/grid/datacolumn/index.md#property-filter) | `string\|array\|null\|false` | The HTML code representing a filter input (e.g. a text field, a dropdown list) that is used for this data column. Default: `null`. | [`yii\grid\DataColumn`](/docs/api/yii/grid/datacolumn/index.md) |
| <span id="property-filterAttribute"></span>[`$filterAttribute`](/docs/api/yii/grid/datacolumn/index.md#property-filterAttribute) | `string\|null` | The attribute name of the [`GridView::$filterModel`](/docs/api/yii/grid/gridview/index.md#property-filterModel) associated with this column. Default: `null`. Available since 2.0.41. | [`yii\grid\DataColumn`](/docs/api/yii/grid/datacolumn/index.md) |
| <span id="property-filterInputOptions"></span>[`$filterInputOptions`](/docs/api/yii/grid/datacolumn/index.md#property-filterInputOptions) | `array` | The HTML attributes for the filter input fields. Default: `['id' => null]`. | [`yii\grid\DataColumn`](/docs/api/yii/grid/datacolumn/index.md) |
| <span id="property-filterOptions"></span>[`$filterOptions`](/docs/api/yii/grid/column/index.md#property-filterOptions) | `array` | The HTML attributes for the filter cell tag. Default: `[]`. | [`yii\grid\Column`](/docs/api/yii/grid/column/index.md) |
| <span id="property-footer"></span>[`$footer`](/docs/api/yii/grid/column/index.md#property-footer) | `string` | The footer cell content. Default: `null`. | [`yii\grid\Column`](/docs/api/yii/grid/column/index.md) |
| <span id="property-footerOptions"></span>[`$footerOptions`](/docs/api/yii/grid/column/index.md#property-footerOptions) | `array` | The HTML attributes for the footer cell tag. Default: `[]`. | [`yii\grid\Column`](/docs/api/yii/grid/column/index.md) |
| <span id="property-format"></span>[`$format`](/docs/api/yii/grid/datacolumn/index.md#property-format) | `string\|array\|`[`Closure`](https://www.php.net/manual/en/class.closure.php) | In which format should the value of each data model be displayed as (e.g. `"raw"`, `"text"`, `"html"`, `['date', 'php:Y-m-d']`). Default: `'text'`. | [`yii\grid\DataColumn`](/docs/api/yii/grid/datacolumn/index.md) |
| <span id="property-grid"></span>[`$grid`](/docs/api/yii/grid/column/index.md#property-grid) | [`yii\grid\GridView`](/docs/api/yii/grid/gridview/index.md) | The grid view object that owns this column. Default: `null`. | [`yii\grid\Column`](/docs/api/yii/grid/column/index.md) |
| <span id="property-header"></span>[`$header`](/docs/api/yii/grid/column/index.md#property-header) | `string\|null` | The header cell content. Default: `null`. | [`yii\grid\Column`](/docs/api/yii/grid/column/index.md) |
| <span id="property-headerOptions"></span>[`$headerOptions`](/docs/api/yii/grid/column/index.md#property-headerOptions) | `array` | The HTML attributes for the header cell tag. Default: `[]`. | [`yii\grid\Column`](/docs/api/yii/grid/column/index.md) |
| <span id="property-label"></span>[`$label`](/docs/api/yii/grid/datacolumn/index.md#property-label) | `string\|null` | Label to be displayed in the [header cell](/docs/api/yii/grid/column/index.md#property-header) and also to be used as the sorting link label when sorting is enabled for this column. Default: `null`. | [`yii\grid\DataColumn`](/docs/api/yii/grid/datacolumn/index.md) |
| <span id="property-options"></span>[`$options`](/docs/api/yii/grid/column/index.md#property-options) | `array` | The HTML attributes for the column group tag. Default: `[]`. | [`yii\grid\Column`](/docs/api/yii/grid/column/index.md) |
| <span id="property-sortLinkOptions"></span>[`$sortLinkOptions`](/docs/api/yii/grid/datacolumn/index.md#property-sortLinkOptions) | `array` | The HTML attributes for the link tag in the header cell generated by [`Sort::link()`](/docs/api/yii/data/sort/index.md#method-link) when sorting is enabled for this column. Default: `[]`. | [`yii\grid\DataColumn`](/docs/api/yii/grid/datacolumn/index.md) |
| <span id="property-value"></span>[`$value`](/docs/api/yii/grid/datacolumn/index.md#property-value) | `string\|`[`Closure`](https://www.php.net/manual/en/class.closure.php)`\|null` | An anonymous function or a string that is used to determine the value to display in the current column. Default: `null`. | [`yii\grid\DataColumn`](/docs/api/yii/grid/datacolumn/index.md) |
| <span id="property-visible"></span>[`$visible`](/docs/api/yii/grid/column/index.md#property-visible) | `bool` | Whether this column is visible. Default: `true`. | [`yii\grid\Column`](/docs/api/yii/grid/column/index.md) |

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| <span id="method-__construct"></span>[`__construct()`](/docs/api/yii/base/baseobject/index.md#method-__construct) | Constructor. | [`yii\base\BaseObject`](/docs/api/yii/base/baseobject/index.md) |
| <span id="method-__call"></span>[`__call()`](/docs/api/yii/base/baseobject/index.md#method-__call) | Calls the named method which is not a class method. | [`yii\base\BaseObject`](/docs/api/yii/base/baseobject/index.md) |
| <span id="method-__get"></span>[`__get()`](/docs/api/yii/base/baseobject/index.md#method-__get) | Returns the value of an object property. | [`yii\base\BaseObject`](/docs/api/yii/base/baseobject/index.md) |
| <span id="method-__isset"></span>[`__isset()`](/docs/api/yii/base/baseobject/index.md#method-__isset) | Checks if a property is set, i.e. defined and not null. | [`yii\base\BaseObject`](/docs/api/yii/base/baseobject/index.md) |
| <span id="method-__set"></span>[`__set()`](/docs/api/yii/base/baseobject/index.md#method-__set) | Sets value of an object property. | [`yii\base\BaseObject`](/docs/api/yii/base/baseobject/index.md) |
| <span id="method-__unset"></span>[`__unset()`](/docs/api/yii/base/baseobject/index.md#method-__unset) | Sets an object property to null. | [`yii\base\BaseObject`](/docs/api/yii/base/baseobject/index.md) |
| <span id="method-canGetProperty"></span>[`canGetProperty()`](/docs/api/yii/base/baseobject/index.md#method-canGetProperty) | Returns a value indicating whether a property can be read. | [`yii\base\BaseObject`](/docs/api/yii/base/baseobject/index.md) |
| <span id="method-canSetProperty"></span>[`canSetProperty()`](/docs/api/yii/base/baseobject/index.md#method-canSetProperty) | Returns a value indicating whether a property can be set. | [`yii\base\BaseObject`](/docs/api/yii/base/baseobject/index.md) |
| <span id="method-className"></span>[`className()`](/docs/api/yii/base/baseobject/index.md#method-className) static | Returns the fully qualified name of this class. | [`yii\base\BaseObject`](/docs/api/yii/base/baseobject/index.md) |
| <span id="method-getDataCellValue"></span>[`getDataCellValue()`](/docs/api/yii/grid/datacolumn/index.md#method-getDataCellValue) | Returns the data cell value. | [`yii\grid\DataColumn`](/docs/api/yii/grid/datacolumn/index.md) |
| <span id="method-hasMethod"></span>[`hasMethod()`](/docs/api/yii/base/baseobject/index.md#method-hasMethod) | Returns a value indicating whether a method is defined. | [`yii\base\BaseObject`](/docs/api/yii/base/baseobject/index.md) |
| <span id="method-hasProperty"></span>[`hasProperty()`](/docs/api/yii/base/baseobject/index.md#method-hasProperty) | Returns a value indicating whether a property is defined. | [`yii\base\BaseObject`](/docs/api/yii/base/baseobject/index.md) |
| [`init()`](#method-init) | Marks the header cell as a column scope and gives the filter input an accessible name derived from its header label. | `DebugDataColumn` |
| <span id="method-renderDataCell"></span>[`renderDataCell()`](/docs/api/yii/grid/column/index.md#method-renderDataCell) | Renders a data cell. | [`yii\grid\Column`](/docs/api/yii/grid/column/index.md) |
| <span id="method-renderFilterCell"></span>[`renderFilterCell()`](/docs/api/yii/grid/column/index.md#method-renderFilterCell) | Renders the filter cell. | [`yii\grid\Column`](/docs/api/yii/grid/column/index.md) |
| <span id="method-renderFooterCell"></span>[`renderFooterCell()`](/docs/api/yii/grid/column/index.md#method-renderFooterCell) | Renders the footer cell. | [`yii\grid\Column`](/docs/api/yii/grid/column/index.md) |
| <span id="method-renderHeaderCell"></span>[`renderHeaderCell()`](/docs/api/yii/grid/column/index.md#method-renderHeaderCell) | Renders the header cell. | [`yii\grid\Column`](/docs/api/yii/grid/column/index.md) |
| <span id="method-getHeaderCellLabel"></span>[`getHeaderCellLabel()`](/docs/api/yii/grid/datacolumn/index.md#method-getHeaderCellLabel) protected | Returns header cell label. | [`yii\grid\DataColumn`](/docs/api/yii/grid/datacolumn/index.md) |
| <span id="method-renderDataCellContent"></span>[`renderDataCellContent()`](/docs/api/yii/grid/datacolumn/index.md#method-renderDataCellContent) protected | Renders the data cell content. | [`yii\grid\DataColumn`](/docs/api/yii/grid/datacolumn/index.md) |
| <span id="method-renderFilterCellContent"></span>[`renderFilterCellContent()`](/docs/api/yii/grid/datacolumn/index.md#method-renderFilterCellContent) protected | Renders the filter cell content. | [`yii\grid\DataColumn`](/docs/api/yii/grid/datacolumn/index.md) |
| <span id="method-renderFooterCellContent"></span>[`renderFooterCellContent()`](/docs/api/yii/grid/column/index.md#method-renderFooterCellContent) protected | Renders the footer cell content. | [`yii\grid\Column`](/docs/api/yii/grid/column/index.md) |
| <span id="method-renderHeaderCellContent"></span>[`renderHeaderCellContent()`](/docs/api/yii/grid/datacolumn/index.md#method-renderHeaderCellContent) protected | Renders the header cell content. | [`yii\grid\DataColumn`](/docs/api/yii/grid/datacolumn/index.md) |

## Method details

### init() <span id="method-init"></span>

```php
public function init(): void
```

Marks the header cell as a column scope and gives the filter input an accessible name derived from its
header label.