Collects information on the shop, like amount of categories, articles, users

@return array
178433
public function getShopDetails()
    {
        $aShopDetails = [
            'Date'                => date(\OxidEsales\Eshop\Core\Registry::getLang()->translateString('fullDateFormat'), time()),
            'URL'                 => $this->getShopLink(),
            'Edition'             => $this->getEdition(),
            'Version'             => $this->getVersion(),
            'Subshops (Total)'    => $this->_countRows('oxshops', true),
            'Subshops (Active)'   => $this->_countRows('oxshops', false),
            'Categories (Total)'  => $this->_countRows('oxcategories', true),
            'Categories (Active)' => $this->_countRows('oxcategories', false),
            'Articles (Total)'    => $this->_countRows('oxarticles', true),
            'Articles (Active)'   => $this->_countRows('oxarticles', false),
            'Users (Total)'       => $this->_countRows('oxuser', true),
        ];

        return $aShopDetails;
    }
501513
public function getActiveCategory()
    {
        $oCategory = \OxidEsales\Eshop\Core\Registry::getConfig()->getTopActiveView()->getActiveCategory();
        if ($oCategory) {
            $this->setActiveCategory($oCategory);
        }

        return $this->_oActCategory;
    }
212878
public function getArticleList()
    {
        if ($this->_aArticleList === null) {
            $this->_aArticleList = [];
            if ($this->_getLoadActionsParam()) {
                // start list
                $oArtList = oxNew(\OxidEsales\Eshop\Application\Model\ArticleList::class);
                $oArtList->loadActionArticles('OXSTART');
                if ($oArtList->count()) {
                    $this->_aArticleList = $oArtList;
                }
            }
        }

        return $this->_aArticleList;
    }
647566
public function getTrackingData()
    {
        return [
            'product'      => $this->getCurrentProduct(),
            'category'     => $this->getCategory(),
            'store'        => $this->getStoreData(),
            'search'       => $this->getSearchData(),
            'exchangeRate' => $this->getExchangeRate(),
            'slug'         => $this->getStoreSlug(),
        ];
    }
505682
public function summary()
    {
        $options = array('count' => true);

        return array(
            'user_total' => $this->user->getList($options),
            'order_total' => $this->order->getList($options),
            'review_total' => $this->review->getList($options),
            'product_total' => $this->product->getList($options)
        );
    }
1259902
private function getAllInfo()
    {
        $data = [
            'id'               => $this->getId(),
            'name'             => $this->getName(),
            'image'            => $this->getImage(),
            'given_name'       => $this->getBiodata('Given name'),
            'family_name'      => $this->getBiodata('Family name'),
            'alternative_name' => $this->getBiodata('Alternate names'),
            'birthday'         => $this->getBiodata('Birthday'),
            'website'          => $this->getBiodata('Website'),
            'favorite'         => $this->getBiodata('Member Favorites'),
            'more'             => $this->getMore(),
            'va'               => $this->getVa(),
            'staff'            => $this->getStaff(),
            'published_manga'  => $this->getStaff(true),
        ];

        return $data;
    }
906823
protected function formCounters()
    {
        $userCounter = $this->getUserCounter();

        $counters = [];

        if (!is_null($this->getUserCounter())) {
            $counters[] = [
                'name' => 'admin users',
                'value' => $userCounter->getAdminCount(),
            ];
            $counters[] = [
                'name' => 'active admin users',
                'value' => $userCounter->getActiveAdminCount(),
            ];
        }

        $counters[] = [
            'name' => 'subShops',
            'value' => \OxidEsales\Eshop\Core\Registry::getConfig()->getMandateCount(),
        ];

        return $counters;
    }
26463
protected function getListCategoryGroup()
    {
        $id = $this->getParam(0);

        if (!isset($id)) {
            return $this->category_group->getList(array('limit' => $this->getLimit()));
        }

        if ($this->getParam('type')) {
            return $this->category_group->getList(array('type' => $id, 'limit' => $this->getLimit()));
        }

        if (!is_numeric($id)) {
            $this->errorAndExit($this->text('Invalid argument'));
        }

        if ($this->getParam('store')) {
            return $this->category_group->getList(array('store_id' => $id, 'limit' => $this->getLimit()));
        }

        $result = $this->category_group->get($id);

        if (empty($result)) {
            $this->errorAndExit($this->text('Unexpected result'));
        }

        return array($result);
    }
402306
protected function getListCart()
    {
        $id = $this->getParam(0);

        if (!isset($id)) {
            return $this->cart->getList(array('limit' => $this->getLimit()));
        }

        if ($this->getParam('user')) {
            return $this->cart->getList(array('user_id' => $id, 'limit' => $this->getLimit()));
        }

        if ($this->getParam('sku')) {
            return $this->cart->getList(array('sku' => $id, 'limit' => $this->getLimit()));
        }

        if (!is_numeric($id)) {
            $this->errorAndExit($this->text('Invalid argument'));
        }

        if ($this->getParam('order')) {
            return $this->cart->getList(array('order_id' => $id, 'limit' => $this->getLimit()));
        }

        if ($this->getParam('store')) {
            return $this->cart->getList(array('store_id' => $id, 'limit' => $this->getLimit()));
        }

        $result = $this->cart->get($id);

        if (empty($result)) {
            $this->errorAndExit($this->text('Unexpected result'));
        }

        return array($result);
    }
354070
protected function _getCategoryList()
    {
        if ($this->_oCatList == null) {
            $this->_oCatList = oxNew(\OxidEsales\Eshop\Application\Model\CategoryList::class);
            $this->_oCatList->updateCategoryTree(false);
        }

        return $this->_oCatList;
    }
415246
public function allInfoArray() {
        $r=array();
        foreach($this->items as $v) {
            $r=array_merge($r,$v->allInfo());
        }
        return $r;
    }
287832
public function getCategories()
    {
        if ($this->categories) {
            return $this->categories;
        }

        $navs = $categories = $subCategories = [];
        $this->event->trigger('adminNavGetNavs', [&$navs, &$categories, &$subCategories]);

        $categories = $this->combine($categories, $subCategories, $navs);
        $categories = $this->filter($categories);
        $categories = $this->sort($categories);

        $this->categories = $categories;

        return $categories;
    }
1177571
private function getAttributeKeys()
    {
        if (!isset($this->attributeKeys)) {
            $this->attributeKeys = $this->category->getList();
        }

        return $this->attributeKeys;
    }
1064281
protected function getListProduct()
    {
        $id = $this->getParam(0);

        if (!isset($id)) {
            return $this->product->getList(array('limit' => $this->getLimit()));
        }

        if (!is_numeric($id)) {
            $this->errorAndExit($this->text('Invalid argument'));
        }

        if ($this->getParam('user')) {
            return $this->product->getList(array('user_id' => $id, 'limit' => $this->getLimit()));
        }

        if ($this->getParam('category')) {
            return $this->product->getList(array('category_id' => $id, 'limit' => $this->getLimit()));
        }

        if ($this->getParam('brand')) {
            return $this->product->getList(array('brand_category_id' => $id, 'limit' => $this->getLimit()));
        }

        if ($this->getParam('class')) {
            return $this->product->getList(array('product_class_id' => $id, 'limit' => $this->getLimit()));
        }

        if ($this->getParam('store')) {
            return $this->product->getList(array('store_id' => $id, 'limit' => $this->getLimit()));
        }

        $result = $this->product->get($id);

        if (empty($result)) {
            $this->errorAndExit($this->text('Unexpected result'));
        }

        return array($result);
    }
1368086
protected function getIDListFromDB() : array
    {
        $arElementIDList = (array) Product::getByCategory($this->sValue)->lists('id');

        //Get product ID list for additional category relation
        $arAdditionalElementIDList = (array) DB::table('lovata_shopaholic_additional_categories')->where('category_id', $this->sValue)->lists('product_id');
        $arElementIDList = array_merge($arElementIDList, $arAdditionalElementIDList);
        $arElementIDList = array_unique($arElementIDList);

        return $arElementIDList;
    }
1171269
function getCategories()
    {
        $result = $this->db->query('SELECT * FROM category');

        $data = [];
        if (isset($result[0])) {
            foreach ($result as $v) {
                $data[$v->get('id')] = $v->get('name');
            }
        }
        return $data;
    }
1078865
protected function collectVisitData()
    {
        $request = $this->request;

        $user = $request->user();
        $userId = $user ? $user->getKey() : null;

        return [
            'user_id'              => $userId,
            'http_referer'         => $request->server('HTTP_REFERER'),
            'url'                  => $request->fullUrl(),
            'request_method'       => $request->method(),
            'request_path'         => $request->getPathInfo(),
            'http_user_agent'      => $request->server('HTTP_USER_AGENT'),
            'http_accept_language' => $request->server('HTTP_ACCEPT_LANGUAGE'),
            'locale'               => $this->app->getLocale(),
            'request_time'         => $request->server('REQUEST_TIME')
        ];
    }