Skip to content

Commit 18bad08

Browse files
author
igor-chepurnoi
committed
add call the parent implementation of init() at the beginning of init() method.
1 parent d768bea commit 18bad08

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Editable.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ class Editable extends InputWidget
5353
*/
5454
public function init()
5555
{
56+
parent::init();
57+
5658
if ($this->url === null) {
5759
throw new InvalidConfigException("You must setup the 'Url' property.");
5860
}
5961

6062
if (!isset($this->options['id'])) {
6163
$this->options['id'] = $this->hasModel() ? Html::getInputId($this->model, $this->attribute) : $this->getId();
6264
}
63-
64-
parent::init();
6565
}
6666

6767
/**
@@ -117,7 +117,8 @@ protected function registerClientScript()
117117
*/
118118
public function getPluginOptions()
119119
{
120-
$pk = ArrayHelper::getValue($this->pluginOptions,
120+
$pk = ArrayHelper::getValue(
121+
$this->pluginOptions,
121122
'pk',
122123
$this->hasActiveRecord() ? $this->model->getPrimaryKey() : null
123124
);

0 commit comments

Comments
 (0)