1 | <?php |
||
26 | class LinkSorter extends Widget |
||
27 | { |
||
28 | /** |
||
29 | * @var Sort the sort definition |
||
30 | */ |
||
31 | public $sort; |
||
32 | /** |
||
33 | * @var array list of the attributes that support sorting. If not set, it will be determined |
||
34 | * using [[Sort::attributes]]. |
||
35 | */ |
||
36 | public $attributes; |
||
37 | /** |
||
38 | * @var array HTML attributes for the sorter container tag. |
||
39 | * @see \yii\helpers\Html::ul() for special attributes. |
||
40 | * @see \yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered. |
||
41 | */ |
||
42 | public $options = ['class' => 'sorter']; |
||
43 | /** |
||
44 | * @var array HTML attributes for the link in a sorter container tag which are passed to [[Sort::link()]]. |
||
45 | * @see \yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered. |
||
46 | * @since 2.0.6 |
||
47 | */ |
||
48 | public $linkOptions = []; |
||
49 | |||
50 | |||
51 | /** |
||
52 | * Initializes the sorter. |
||
53 | */ |
||
54 | 3 | public function init() |
|
62 | |||
63 | /** |
||
64 | * Executes the widget. |
||
65 | * This method renders the sort links. |
||
66 | * @return string the result of widget execution to be outputted. |
||
67 | */ |
||
68 | 2 | public function run() |
|
72 | |||
73 | /** |
||
74 | * Renders the sort links. |
||
75 | * @return string the rendering result |
||
76 | */ |
||
77 | 2 | protected function renderSortLinks() |
|
87 | } |
||
88 |