Class lispa\amos\core\views\AmosGridView
Class AmosGridView
Public Properties
Property | Type | Description | Defined By |
---|---|---|---|
$afterRow | Closure | An anonymous function that is called once AFTER rendering each data model. | yii\grid\GridView |
$autoIdPrefix | string | The prefix to the automatically generated widget IDs. | yii\base\Widget |
$autoXlFormat | lispa\amos\core\views\AmosGridView | ||
$beforeRow | Closure | An anonymous function that is called once BEFORE rendering each data model. | yii\grid\GridView |
$behaviors | yii\base\Behavior[] | List of behaviors attached to this component | yii\base\Component |
$bootstrap | lispa\amos\core\views\AmosGridView | ||
$caption | string | The caption of the grid table | yii\grid\GridView |
$captionOptions | array | The HTML attributes for the caption element. | yii\grid\GridView |
$columns | array | Grid column configuration. | yii\grid\GridView |
$counter | integer | A counter used to generate $id for widgets. | yii\base\Widget |
$dataColumnClass | string | The default data column class if the class name is not explicitly specified when configuring a data column. | lispa\amos\core\views\AmosGridView |
$dataProvider | yii\data\DataProviderInterface | The data provider for the view. | yii\widgets\BaseListView |
$emptyCell | string | The HTML display when the content of a cell is empty. | yii\grid\GridView |
$emptyText | string|false | The HTML content to be displayed when $dataProvider does not have any data. | yii\widgets\BaseListView |
$emptyTextOptions | array | The HTML attributes for the emptyText of the list view. | yii\widgets\BaseListView |
$enableExport | boolean | Enable export of the data present in the grid view without other columns. | lispa\amos\core\views\AmosGridView |
$filterErrorOptions | array | The options for rendering every filter error message. | yii\grid\GridView |
$filterErrorSummaryOptions | array | The options for rendering the filter error summary. | yii\grid\GridView |
$filterModel | yii\base\Model | The model that keeps the user-entered filter data. | yii\grid\GridView |
$filterPosition | string | Whether the filters should be displayed in the grid view. | yii\grid\GridView |
$filterRowOptions | array | The HTML attributes for the filter row element. | yii\grid\GridView |
$filterSelector | string | Additional jQuery selector for selecting filter input fields | yii\grid\GridView |
$filterUrl | string|array | The URL for returning the filtering result. | yii\grid\GridView |
$footerRowOptions | array | The HTML attributes for the table footer row. | yii\grid\GridView |
$formatter | array|yii\i18n\Formatter | The formatter used to format model attribute values into displayable texts. | yii\grid\GridView |
$headerRowOptions | array | The HTML attributes for the table header row. | yii\grid\GridView |
$id | string | ID of the widget. | yii\base\Widget |
$layout | lispa\amos\core\views\AmosGridView | ||
$name | lispa\amos\core\views\AmosGridView | ||
$options | array | The HTML attributes for the container tag of the grid view. | yii\grid\GridView |
$pager | array | The configuration for the pager widget. | yii\widgets\BaseListView |
$panelTemplate | lispa\amos\core\views\AmosGridView | ||
$pjax | lispa\amos\core\views\AmosGridView | ||
$rowOptions | array|Closure | The HTML attributes for the table body rows. | yii\grid\GridView |
$showFooter | boolean | Whether to show the footer section of the grid table. | yii\grid\GridView |
$showHeader | boolean | Whether to show the header section of the grid table. | yii\grid\GridView |
$showOnEmpty | boolean | Whether to show the grid view if $dataProvider returns no data. | yii\grid\GridView |
$showPageSummary | lispa\amos\core\views\AmosGridView | ||
$showPager | lispa\amos\core\views\AmosGridView | ||
$sorter | array | The configuration for the sorter widget. | yii\widgets\BaseListView |
$stack | yii\base\Widget[] | The widgets that are currently being rendered (not ended). | yii\base\Widget |
$summary | lispa\amos\core\views\AmosGridView | ||
$summaryOptions | array | The HTML attributes for the summary of the list view. | yii\widgets\BaseListView |
$tableOptions | lispa\amos\core\views\AmosGridView | ||
$title | lispa\amos\core\views\AmosGridView | ||
$view | yii\web\View | The view object that can be used to render views or view files. | yii\base\Widget |
$viewPath | string | The directory containing the view files for this widget. | yii\base\Widget |
Public Methods
Method | Description | Defined By |
---|---|---|
__call() | Calls the named method which is not a class method. | yii\base\Component |
__clone() | This method is called after the object is created by cloning an existing one. | yii\base\Component |
__construct() | Constructor. | yii\base\Object |
__get() | Returns the value of a component property. | yii\base\Component |
__isset() | Checks if a property is set, i.e. defined and not null. | yii\base\Component |
__set() | Sets the value of a component property. | yii\base\Component |
__unset() | Sets a component property to be null. | yii\base\Component |
afterRun() | This method is invoked right after a widget is executed. | yii\base\Widget |
attachBehavior() | Attaches a behavior to this component. | yii\base\Component |
attachBehaviors() | Attaches a list of behaviors to the component. | yii\base\Component |
beforeRun() | This method is invoked right before the widget is executed. | yii\base\Widget |
begin() | Begins a widget. | yii\base\Widget |
behaviors() | Returns a list of behaviors that this component should behave as. | yii\base\Component |
canGetProperty() | Returns a value indicating whether a property can be read. | yii\base\Component |
canSetProperty() | Returns a value indicating whether a property can be set. | yii\base\Component |
className() | Returns the fully qualified name of this class. | yii\base\Object |
detachBehavior() | Detaches a behavior from the component. | yii\base\Component |
detachBehaviors() | Detaches all behaviors from the component. | yii\base\Component |
end() | Ends a widget. | yii\base\Widget |
ensureBehaviors() | Makes sure that the behaviors declared in behaviors() are attached to this component. | yii\base\Component |
getBehavior() | Returns the named behavior object. | yii\base\Component |
getBehaviors() | Returns all behaviors attached to this component. | yii\base\Component |
getId() | Returns the ID of the widget. | yii\base\Widget |
getView() | Returns the view object that can be used to render views or view files. | yii\base\Widget |
getViewPath() | Returns the directory containing the view files for this widget. | yii\base\Widget |
hasEventHandlers() | Returns a value indicating whether there is any handler attached to the named event. | yii\base\Component |
hasMethod() | Returns a value indicating whether a method is defined. | yii\base\Component |
hasProperty() | Returns a value indicating whether a property is defined for this component. | yii\base\Component |
init() | Initializes the grid view. | lispa\amos\core\views\AmosGridView |
off() | Detaches an existing event handler from this component. | yii\base\Component |
on() | Attaches an event handler to an event. | yii\base\Component |
render() | Renders a view. | yii\base\Widget |
renderCaption() | Renders the caption element. | yii\grid\GridView |
renderColumnGroup() | Renders the column group HTML. | yii\grid\GridView |
renderEmpty() | Renders the HTML content indicating that the list view has no data. | yii\widgets\BaseListView |
renderErrors() | Renders validator errors of filter model. | yii\grid\GridView |
renderFile() | Renders a view file. | yii\base\Widget |
renderFilters() | Sovrascriviamo la funzione nativa per assegnare al tag TD l'attributo 'title' con valore prelevato dalla label dell'HeaderTable Renders the filter. | lispa\amos\core\views\AmosGridView |
renderItems() | Renders the data models for the grid view. | yii\grid\GridView |
renderPager() | Renders the pager. | lispa\amos\core\views\AmosGridView |
renderSection() | Renders a section of the specified name. | yii\grid\GridView |
renderSorter() | Renders the sorter. | yii\widgets\BaseListView |
renderSummary() | Renders the summary text. | yii\widgets\BaseListView |
renderTableBody() | Renders the table body. | lispa\amos\core\views\AmosGridView |
renderTableFooter() | Renders the table footer. | yii\grid\GridView |
renderTableHeader() | Sovrascriviamo la funzione nativa per assegnare al tag TR la classe filters e a TD la classe input_element stilizzata in modo tale da essere vista nel mobile a differenza del comportamento base della tabella responsiva Renders the table header. | lispa\amos\core\views\AmosGridView |
renderTableRow() | Sovrascriviamo la funzione nativa per assegnare al tag TD l'attributo 'title' con valore prelevato dalla label dell'HeaderTable Renders a table row with the given data model and key. | lispa\amos\core\views\AmosGridView |
run() | Runs the widget. | yii\grid\GridView |
setId() | Sets the ID of the widget. | yii\base\Widget |
setView() | Sets the view object to be used by this widget. | yii\base\Widget |
trigger() | Triggers an event. | yii\base\Component |
widget() | Creates a widget instance and runs it. | yii\base\Widget |
Protected Methods
Method | Description | Defined By |
---|---|---|
createDataColumn() | Creates a yii\grid\DataColumn object based on a string in the format of "attribute:format:label". | yii\grid\GridView |
getClientOptions() | Returns the options for the grid view JS widget. | yii\grid\GridView |
guessColumns() | This function tries to guess the columns to show from the given data if $columns are not explicitly specified. | yii\grid\GridView |
initColumns() | Creates column objects and initializes them. | yii\grid\GridView |
Events
Event | Type | Description | Defined By |
---|---|---|---|
EVENT_AFTER_RUN | yii\base\WidgetEvent | An event raised right after executing a widget. (available since version 2.0.11) | yii\base\Widget |
EVENT_BEFORE_RUN | yii\base\WidgetEvent | An event raised right before executing a widget. (available since version 2.0.11) | yii\base\Widget |
EVENT_INIT | yii\base\Event | An event that is triggered when the widget is initialized via init(). (available since version 2.0.11) | yii\base\Widget |
Constants
Constant | Value | Description | Defined By |
---|---|---|---|
FILTER_POS_BODY | 'body' | yii\grid\GridView | |
FILTER_POS_FOOTER | 'footer' | yii\grid\GridView | |
FILTER_POS_HEADER | 'header' | yii\grid\GridView |
Property Details
The default data column class if the class name is not explicitly specified when configuring a data column. Defaults to 'lispa\amos\core\views\grid\DataColumn'.
Enable export of the data present in the grid view without other columns.
Method Details
Initializes the grid view.
This method will initialize required property values and instantiate $columns objects.
public void init ( ) |
Sovrascriviamo la funzione nativa per assegnare al tag TD l'attributo 'title' con valore prelevato dalla label dell'HeaderTable Renders the filter.
public string renderFilters ( ) | ||
return | string | The rendering result. |
---|
Renders the pager.
public string renderPager ( ) | ||
return | string | The rendering result |
---|
Renders the table body.
public string renderTableBody ( ) | ||
return | string | The rendering result. |
---|
Sovrascriviamo la funzione nativa per assegnare al tag TR la classe filters e a TD la classe input_element stilizzata in modo tale da essere vista nel mobile a differenza del comportamento base della tabella responsiva Renders the table header.
public string renderTableHeader ( ) | ||
return | string | The rendering result. |
---|
Sovrascriviamo la funzione nativa per assegnare al tag TD l'attributo 'title' con valore prelevato dalla label dell'HeaderTable Renders a table row with the given data model and key.
public string renderTableRow ( $model, $key, $index ) | ||
$model | mixed | The data model to be rendered |
$key | mixed | The key associated with the data model |
$index | integer | The zero-based index of the data model among the model array returned by $dataProvider. |
return | string | The rendering result |
---|