Returns list of valid shop views

@return array
326634
protected function _getValidShopViews()
    {
        if (empty($this->_aValidShopViews)) {
            $aTables = $this->getShopTables();
            $this->_aValidShopViews = [];

            foreach ($aTables as $sTable) {
                $this->prepareShopTableViewNames($sTable);
            }
        }

        return $this->_aValidShopViews;
    }
621717
public function actionList()
    {
        $models = $this->getNewEntity()->fetchAll();
        $view = $this->createView('list');
        $view['content'] = $models;
        return $view;
    }
1127287
public function getViewNames()
    {
        $names = $this->query(
            'SELECT table_name FROM information_schema.tables WHERE table_schema=? AND table_type=?',
            array(
                $this->getTableSchema(),
                'VIEW'
            )
        );
        // Flatten array
        foreach ($names as &$name) {
            $name = $name['table_name'];
        }
        return $names;
    }
542136
public function getList()
    {
        $pageType = $this->params('pageType', PageTypes::NORMAL);
        $pageId = $this->params('pageId', null);

        /** @var \Rcm\Validator\Page $validator */
        $validator = clone($this->getServiceLocator()->get(\Rcm\Validator\Page::class));
        $validator->setPageType($pageType);

        $return = [
            'valid' => true
        ];

        if (!$validator->isValid($pageId)) {
            $return['valid'] = false;
            $return['error'] = $validator->getMessages();

            /** @var \Zend\Http\Response $response */
            $response = $this->response;

            $errorCodes = array_keys($return['error']);

            foreach ($errorCodes as &$errorCode) {
                if ($errorCode == $validator::PAGE_EXISTS) {
                    $response->setStatusCode(409);
                    break;
                } elseif ($errorCode == $validator::PAGE_NAME) {
                    $response->setStatusCode(417);
                }
            }
        }

        return new JsonModel($return);
    }
1031486
public function getRecommList()
    {
        if (!$this->getViewConfig()->getShowListmania()) {
            return false;
        }

        if ($this->_oRecommList === null) {
            $this->_oRecommList = false;
            if ($oProduct = $this->getProduct()) {
                $oRecommList = oxNew(\OxidEsales\Eshop\Application\Model\RecommendationList::class);
                $this->_oRecommList = $oRecommList->getRecommListsByIds([$oProduct->getId()]);
            }
        }

        return $this->_oRecommList;
    }
63664
protected function getOnlyViews()
    {
        $viewsToCreate = Helpers::removeEmptyItems(explode(',', $this->option('only-views')));

        return array_intersect($this->views, $viewsToCreate);
    }
963659
public function getList()
    {
        $this->_aThemeList = [];
        $sOutDir = \OxidEsales\Eshop\Core\Registry::getConfig()->getViewsDir();
        foreach (glob($sOutDir . "*", GLOB_ONLYDIR) as $sDir) {
            $oTheme = oxNew(\OxidEsales\Eshop\Core\Theme::class);
            if ($oTheme->load(basename($sDir))) {
                $this->_aThemeList[$sDir] = $oTheme;
            }
        }

        return $this->_aThemeList;
    }
1304348
public function getSelectLists()
    {
        if ($this->_aSelectLists === null) {
            $this->_aSelectLists = false;
            if (\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('bl_perfLoadSelectLists')) {
                $this->_aSelectLists = $this->getProduct()->getSelectLists();
            }
        }

        return $this->_aSelectLists;
    }
92655
protected function _getAllViews()
    {
        if (empty($this->_aAllViews)) {
            $this->_aAllViews = \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->getCol("SHOW TABLES LIKE  'oxv\_%'");
        }

        return $this->_aAllViews;
    }
842826
public function getReviews()
    {
        if ($this->_aReviews === null) {
            $this->_aReviews = false;
            if (\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('bl_perfLoadReviews')) {
                $this->_aReviews = $this->getProduct()->getReviews();
            }
        }

        return $this->_aReviews;
    }
532625
protected function getIDListFromCache() : array
    {
        $arElementIDList = parent::getIDListFromCache();

        //Get active product list
        $arActiveProductIDList = ProductListStore::instance()->active->get();
        if (empty($arActiveProductIDList) || empty($arElementIDList)) {
            return [];
        }

        $arResult = [];
        foreach ($arElementIDList as $iProductID => $iBrandID) {
            if (!in_array($iProductID, $arActiveProductIDList)) {
                continue;
            }

            $arResult[] = $iBrandID;
        }

        $arResult = array_unique($arResult);

        return $arResult;
    }
862846
protected function validModes()
    {
        return [
            self::MODE_DESC,
            self::MODE_ASC,
            self::MODE_RANDOM,
            self::MODE_VALUES,
            self::MODE_CUSTOM
        ];
    }
388243
public function getViewHelperConfig()
    {
        return [
            'factories' => [
                View\Helper\Params::class => View\Helper\Factory\ParamsFactory::class,
                View\Helper\Config::class => View\Helper\Factory\ConfigFactory::class,
                View\Helper\Env::class => View\Helper\Factory\EnvFactory::class,
                View\Helper\CdnVersion::class => View\Helper\Factory\EnvFactory::class,
                View\Helper\FormLocalMessage::class => InvokableFactory::class,
                //\Zend\Form\View\Helper\FormElementErrors::class => View\Helper\Factory\FormElementErrorsFactory::class,
            ],
            'aliases' => [
                'helperParams' => View\Helper\Params::class,
                'helperConfig' => View\Helper\Config::class,
                'helperEnv' => View\Helper\Env::class,
                'helperCdnVersion' => View\Helper\CdnVersion::class,
                'formLocalMessage' => View\Helper\FormLocalMessage::class,
                'helperFormLocalMessage' => View\Helper\FormLocalMessage::class,
            ],
        ];
    }
142831
public function getLoadedProductCollection()
    {
        $params = $this->getRequest()->getParams();
        if (! isset($params['code']) || ! $this->helper->isCodeValid($params['code'])) {
            $this->helper->log('Product push no valid code is set');
            return [];
        }

        $mode = $this->getRequest()->getActionName();
        $limit = $this->recommnededHelper->getDisplayLimitByMode($mode);
        $productIds = $this->recommnededHelper->getProductPushIds();
        $productCollection = $this->catalog->getProductCollectionFromIds($productIds, $limit);

        //important check the salable product in template
        return $productCollection;
    }
152368
public function viewValues()
    {
        $result = [];
        foreach ($this->collection() as $param) {
            $result = $result + $param->viewValues();
        }

        return $result;
    }
980765
public function getOrderItems()
    {
        if (\Yii::$app->user->isGuest) {
            $session = \Yii::$app->session;
            $products = $session[self::SESSION_KEY];
        } else {
            $order = Order::find()->where(['user_id' => \Yii::$app->user->id, 'status' => OrderStatus::STATUS_INCOMPLETE])->one();
            if (!empty($order))
                $products = OrderProduct::find()->asArray()->where(['order_id' => $order->id])->all();
        }
        return $products ?? false;
    }
417275
protected function _getViewListSize()
    {
        if (!$this->_iViewListSize) {
            $config = \OxidEsales\Eshop\Core\Registry::getConfig();
            if ($profile = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('profile')) {
                if (isset($profile[1])) {
                    $config->setConfigParam('iAdminListSize', (int)$profile[1]);
                }
            }

            $this->_iViewListSize = (int)$config->getConfigParam('iAdminListSize');
            if (!$this->_iViewListSize) {
                $this->_iViewListSize = 10;
                $config->setConfigParam('iAdminListSize', $this->_iViewListSize);
            }
        }

        return $this->_iViewListSize;
    }