We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 691ae77 commit 5cdf33fCopy full SHA for 5cdf33f
widgets/Comment.php
@@ -5,6 +5,7 @@
5
use Yii;
6
use yii\base\InvalidConfigException;
7
use yii\base\Widget;
8
+use yii\helpers\ArrayHelper;
9
use yii\helpers\Json;
10
use yii2mod\comments\CommentAsset;
11
use yii2mod\comments\Module;
@@ -85,7 +86,7 @@ public function init()
85
86
throw new InvalidConfigException(Yii::t('yii2mod.comments', 'The "model" property must be set.'));
87
}
88
- $this->pjaxContainerId = 'comment-pjax-container-' . $this->getId();
89
+ $this->pjaxContainerId = ArrayHelper::getValue($this->clientOptions, 'pjaxContainerId', 'comment-pjax-container-' . $this->getId());
90
$this->entity = hash('crc32', get_class($this->model));
91
$this->entityId = $this->model->{$this->entityIdAttribute};
92
0 commit comments