_form_language.php 754 Bytes
<?php
    use artbox\catalog\models\OptionLang;
    use artbox\core\helpers\SlugifyDecorator;
    use artbox\core\models\Language;
    use yii\web\View;
    use yii\widgets\ActiveForm;
    
    /**
     * @var OptionLang $model_lang
     * @var Language   $language
     * @var ActiveForm $form
     * @var View       $this
     */
?>
<?php
    $attributeField = $form->field($model_lang, '[' . $language->id . ']value')
                           ->textInput([ 'maxlength' => true ]);
    echo $attributeField;
?>

<?= SlugifyDecorator::decorate(
    $form->field($model_lang, '[' . $language->id . ']aliasValue'),
    [ '/alias/slugify' ],
    $attributeField,
    false,
    $language->id
)
                    ->textInput([ 'maxlength' => true ]); ?>