PHP Class yii\widgets\LinkSorter

LinkSorter will generate a hyperlink for every attribute declared in [[sort]]. For more details and usage information on LinkSorter, see the guide article on sorting.
Since: 2.0
Author: Qiang Xue ([email protected])
Inheritance: extends yii\base\Widget
显示文件 Open project: yiisoft/yii2 Class Usage Examples

Public Properties

Property Type Description
$attributes list of the attributes that support sorting. If not set, it will be determined using [[Sort::attributes]].
$linkOptions HTML attributes for the link in a sorter container tag which are passed to [[Sort::link()]].
$options HTML attributes for the sorter container tag.
$sort the sort definition

Public Methods

Method Description
init ( ) Initializes the sorter.
run ( ) Executes the widget.

Protected Methods

Method Description
renderSortLinks ( ) : string Renders the sort links.

Method Details

init() public method

Initializes the sorter.
public init ( )

run() public method

This method renders the sort links.
public run ( )

Property Details

$attributes public_oe property

list of the attributes that support sorting. If not set, it will be determined using [[Sort::attributes]].
public $attributes

$linkOptions public_oe property

HTML attributes for the link in a sorter container tag which are passed to [[Sort::link()]].
See also: yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
Since: 2.0.6
public $linkOptions

$options public_oe property

HTML attributes for the sorter container tag.
See also: yii\helpers\Html::ul() for special attributes.
See also: yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
public $options

$sort public_oe property

the sort definition
public $sort