launcherx / yii2-widget-cronui
Widget for generating cron string
Installs: 451
Dependents: 0
Suggesters: 0
Security: 0
Type:yii2-extension
pkg:composer/launcherx/yii2-widget-cronui
Requires
- launcherx/bootstrap-cronui: ~2.0
 - npm-asset/bootstrap-select: ~1.13
 
This package is auto-updated.
Last update: 2025-10-29 02:29:08 UTC
README
Widget for generating cron string
Installation
The preferred way to install this extension is through composer.
Either run
$ php composer.phar require launcherx/yii2-widget-cronui "*"
or add
"launcherx/yii2-widget-cronui": "*"
to the `require` section of your composer.json file.
Usage
Initialization
You can use this widget in an [[yii\bootstrap\ActiveForm|ActiveForm]] using the [[yii\widgets\ActiveField::widget()|widget()]] method, for example like this:
#!php
<?= $form->field($model, 'item_id')->widget(\launcherx\cronui\CronUI::classname(), [
       'options' => [
            'class' => 'form-control',
        ],
        'pluginOptions' => [
            'dropDownMultiple' => true,
            'dropDownStyled'   => true
        ]
]) ?>
Extension options
Default extension options
 'pluginOptions' => [
     'initial'           => '* * * * *',
     'dropDownMultiple'  => false,
     'dropDownStyled'    => false,
     'dropDownSizeClass' => 'col-md-2'
 ]
| Name | Type | Default | Description | 
|---|---|---|---|
| initial | string | `'* * * * *'` | The initial option allows you the set the initial cron value. | 
| dropDownMultiple | boolean | false | Allow to choose multiple values in dropdown | 
| dropDownStyled | boolean | false | Style dropdowns using bootstrap-select plugin | 
| dropDownStyledFlat | boolean | false | Style dropdowns without border radius | 
| dropDownSizeClass | string | 'col-md-2' | Set dropdown column size | 
License
Copyright (c) 2017 Imants Cernovs under the MIT License.