getRotatingModule(); $this->setTitle('Produits tournans'); $this->addBreadcrumb($this->getTitle()); $this->addButton(['label' => 'Nouveau produit tournant ', 'url' => 'rotating/create', 'class' => 'btn btn-primary']); ?>
$dataProvider, 'columns' => [ 'name', [ 'attribute' => 'day', 'value' => function(Rotating $rotating) { return $rotating->getDayAsString(); } ], [ 'label' => 'Produits', 'format' => 'raw', 'value' => function(Rotating $rotating) { return implode(' ', array_map(function($rotatingProduct) { return ''.$rotatingProduct->getProduct()->name.''; }, $rotating->getRotatingProducts())); } ], [ 'label' => 'Distributions à venir', 'format' => 'raw', 'value' => function($rotating) use ($rotatingModule) { return $rotatingModule->getResolver()->getRotatingProductsOfIncomingDistributionsAsHtml($rotating); } ], [ 'class' => 'yii\grid\ActionColumn', 'template' => '{update} {delete}', 'headerOptions' => ['class' => 'column-actions'], 'contentOptions' => ['class' => 'column-actions'], 'buttons' => [ 'update' => function ($url, $model) { return Html::a('', $url, [ 'title' => 'Modifier', 'class' => 'btn btn-default' ]); }, 'delete' => function ($url, $model) { return Html::a('', $url, [ 'title' => 'Supprimer', 'class' => 'btn btn-default' ]); } ], ], ], ]); ?>