Open starrychloe opened 9 years ago
Surely there is a solution for this? I don't know what it is though.
-echo GridView::widget(['dataProvider' => $dataProvider, 'columns' => ['id', 'headline', 'desc1', 'desc2', 'display_url', 'landing_url', 'status', | [ | 'class' => 'yii\grid\ActionColumn', | 'template' => '{pauseActive}', | 'buttons' => [ | 'pauseActive' => function ($url, $model, $key) { | return $model->status == Constants::ACTIVE ? Html::a('Pause', $url) : Html::a('UnPause', $url); | } | ] | ], | ]]) |
Without them, it gives errors like
MtHaml\Exception\SyntaxErrorException The line was indented more than one level deeper than the previous line in
In case it wasn't clear, HAML allows multi-line code if it ends with ,: http://haml.info/docs/yardoc/file.REFERENCE.html#runningruby
,
But in your case it also contains [, ], {, }, ; at the end of lines.
[
]
{
}
;
If you want to offer this features go to MtHaml, this project is just integrate MtHaml in Yii
Surely there is a solution for this? I don't know what it is though.
Without them, it gives errors like