private function addVirtualCategoryData(CategoryInterface $category)
    {
        $isVirtualCategory = (bool) $this->getRequest()->getParam('is_virtual_category');
        $category->setIsVirtualCategory($isVirtualCategory);

        if ($isVirtualCategory) {
            $category->getVirtualRule()->loadPost($this->getRequest()->getParam('virtual_rule', []));
            $category->setVirtualCategoryRoot($this->getRequest()->getParam('virtual_category_root', null));
        }

        return $this;
    }
private function addVirtualCategoryData(CategoryInterface $category)
    {
        $isVirtualCategory = (bool) $this->getRequest()->getParam('is_virtual_category');
        $category->setIsVirtualCategory($isVirtualCategory);

        if ($isVirtualCategory) {
            $category->getVirtualRule()->loadPost($this->getRequest()->getParam('virtual_rule', []));
            $category->setVirtualCategoryRoot($this->getRequest()->getParam('virtual_category_root', null));
        }

        return $this;
    }
private function addVirtualCategoryData ( CategoryInterface $ category ) { $ isVirtualCategory = ( bool ) $ this -> getRequest ( ) -> getParam ( 'is_virtual_category' ) ; $ category -> setIsVirtualCategory ( $ isVirtualCategory ) ; if ( $ isVirtualCategory ) { $ category -> getVirtualRule ( ) -> loadPost ( $ this -> getRequest ( ) -> getParam ( 'virtual_rule' , [ ] ) ) ; $ category -> setVirtualCategoryRoot ( $ this -> getRequest ( ) -> getParam ( 'virtual_category_root' , null ) ) ; } return $ this ; }
Append virtual rule params to the category.

@param CategoryInterface $category Category.

@return $this
Append virtual rule params to the category .