allProducts)) { $this->allProducts = \XLite\Core\Database::getRepo('XLite\Model\Product')->findAll(); } return true == $countOnly ? count($this->allProducts) : $this->allProducts; } // disabling ability to sort products and switch between display modes protected function defineWidgetParams() { parent::defineWidgetParams(); $this->widgetParams[self::PARAM_GRID_COLUMNS]->setValue(3); unset($this->widgetParams[self::PARAM_SHOW_DISPLAY_MODE_SELECTOR]); unset($this->widgetParams[self::PARAM_SHOW_SORT_BY_SELECTOR]); } }