CKEDITOR.instances['id_поля что надо перезагрузить'].setData('ваш text')
CKEDITOR.instances['opisko'].setData('ваш text')
'urlManager'=>array(
//... ваши правила
'rules'=>array(
'goods_info'=>'site/goodsInfoRedirect',
),
),
public function actionGoodsInfoRedirect(){
if (isset($get['number']) && isset($get['brand']) ) {
Yii::$app->response->redirect(['/catalog/', 'slug' => Inflector::slug(Inflector::transliterate($get['number'] . '-' . $get['brand']))], 301);
return;
}
}
public function rules()
{
return array(
array('email, password', 'required'),
);
}
<div class="form">
<?php $form=$this->beginWidget('CActiveForm', array(
'id' => 'RegistrationForm_User',
'enableClientValidation' => false,
)); ?>
<?php echo $form->errorSummary($model); ?>
<div class="dr-col-50">
<div class="row">
<?php echo $form->labelEx($model, 'full_name'); ?>
<?php echo $form->textField($model, 'full_name'); ?>
</div>
<div class="row">
<?php echo $form->labelEx($model, 'email'); ?>
<?php echo $form->textField($model, 'email', ['placeholder' => 'E-mail']); ?>
</div>
<div class="row">
<?php echo $form->labelEx($model, 'password'); ?>
<?php echo $form->passwordField($model, 'password'); ?>
</div>
</div>
<div class="clearfix"></div>
<?php $this->endWidget(); ?>
</div>
public function checkUniqueness($attribute, $params)
{
$data = self::find()->where([ 'name'=>$this->login])->one();
if(!is_null($data)){
$this->addError($attribute, Yii::t('app', 'This login is occupied'));
}
}
/**
* Merges two or more arrays into one recursively.
* If each array has an element with the same string key value, the latter
* will overwrite the former (different from array_merge_recursive).
* Recursive merging will be conducted if both arrays have an element of array
* type and are having the same key.
* For integer-keyed elements, the elements from the latter array will
* be appended to the former array.
* @param array $a array to be merged to
* @param array $b array to be merged from. You can specify additional
* arrays via third argument, fourth argument etc.
* @return array the merged array (the original arrays are not changed.)
* @see mergeWith
*/
public function mergeArray($a,$b)
{
$args=func_get_args();
$res=array_shift($args);
while(!empty($args))
{
$next=array_shift($args);
foreach($next as $k => $v)
{
if(is_integer($k))
isset($res[$k]) ? $res[]=$v : $res[$k]=$v;
elseif(is_array($v) && isset($res[$k]) && is_array($res[$k]))
$res[$k]=self::mergeArray($res[$k],$v);
else
$res[$k]=$v;
}
}
return $res;
}