skeeks\cms\cmsWidgets\filters\ContentElementFiltersWidget::init PHP Method

init() public method

public init ( )
    public function init()
    {
        parent::init();
        if (!$this->searchModelAttributes) {
            $this->searchModelAttributes = [];
        }
        if (!$this->searchModel) {
            $this->searchModel = new \skeeks\cms\cmsWidgets\filters\models\SearchProductsModel();
        }
        if (!$this->searchRelatedPropertiesModel && $this->cmsContent) {
            $this->searchRelatedPropertiesModel = new SearchRelatedPropertiesModel();
            $this->searchRelatedPropertiesModel->initCmsContent($this->cmsContent);
        }
        $this->searchModel->load(\Yii::$app->request->get());
        if ($this->searchRelatedPropertiesModel) {
            $this->searchRelatedPropertiesModel->load(\Yii::$app->request->get());
        }
    }