/** * Widget based relations */ protected function getWidgetRelationModelQuery($className, $link = null, $options = []) { $link = !is_array($link) ? ['parent_id' => 'id'] : $link; $options['select'] = isset($options['select']) ? $options['select'] : ['id', 'parent_id', 'parent_type']; $options['with'] = array_merge(ArrayHelper::getValue($options, 'with', []), ['count', 'newCount']); $options['andWhere'] = isset($options['andWhere']) ? $options['andWhere'] : ['parent_type' => $this->isWhat()]; return $this->getRelationQuery($className, $link, $options); }