PHP code example of kirillantv / yii2-dynamicvalue

1. Go to this page and download the library: Download kirillantv/yii2-dynamicvalue library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

kirillantv / yii2-dynamicvalue example snippets


<?= DynamicValue::widget([
  'data' => $model,
  'column' => 'status',
  'items' => [
      [
          'value' => 1,
          'label' => 'Disable order',
          'link' => ['order/disable', 'id' => $model->id],
          'options' => ['class' => 'btn btn-danger btn-block']
  ],
      [
          'value' => 0,
          'tag' => 'span',
          'label' => 'Is done',
          'options' => ['class' => 'btn btn-success btn-block']
  ]]
  ]);

'items' => [
    1 => [
        ...
    ],
    3 => [
        ...
    ],
    'textValue' => [
        ...
    ]
]