/** * {@inheritdoc} */ protected function getList($offset, $limit, $sort = array(), $filter = array(), array $wholeParams = array()) { $ret = parent::getList($offset, $limit, $sort, $filter, $wholeParams); foreach ($ret['data'] as &$rule) { $this->appendTableNameToRule($rule); } return $ret; }
/** * The getList function returns an array of the configured class model. * The listing query created in the getListQuery function. * The pagination of the listing is handled inside this function. * * @param int $offset * @param int $limit * @param array $sort Contains an array of Ext JS sort conditions * @param array $filter Contains an array of Ext JS filters * @param array $wholeParams Contains all passed request parameters * @return array */ protected function getList($offset, $limit, $sort = array(), $filter = array(), array $wholeParams = array()) { if (!isset($wholeParams['shopId'])) { $wholeParams['shopId'] = $this->getDefaultShopId(); } $data = parent::getList(null, null, $sort, $filter, $wholeParams); /**@var $shop Shop */ $shop = $this->getManager()->find('Shopware\\Models\\Shop\\Shop', $wholeParams['shopId']); foreach ($data['data'] as &$theme) { /**@var $instance Template */ $instance = $this->getRepository()->find($theme['id']); $theme['screen'] = $this->container->get('theme_util')->getPreviewImage($instance); $theme['path'] = $this->container->get('theme_path_resolver')->getDirectory($instance); if ($theme['version'] >= 3) { $theme = $this->get('theme_service')->translateTheme($instance, $theme); } if ($shop instanceof Shop && $shop->getTemplate() instanceof Template) { $theme['enabled'] = $theme['id'] === $shop->getTemplate()->getId(); } } $data = $this->get('events')->filter('Shopware_Theme_Listing_Loaded', $data, array('shop' => $shop)); return $data; }
protected function getList($offset, $limit, $sort = array(), $filter = array(), array $wholeParams = array()) { $result = parent::getList($offset, $limit, $sort, $filter, $wholeParams); $this->addParentPath($result['data']); return $result; }