Class CatalogSelectWidgetAjaxController

Class CatalogSelectWidgetAjaxController

This ajax controller is used by the catalog selector widget to fetch all products and categories in the shop.

HttpViewController implements HttpViewControllerInterface
AdminHttpViewController implements AdminStatusOnlyInterface
CatalogSelectWidgetAjaxController
Package: AdminHttpViewControllers
Category: System
Extends: AdminHttpViewController
Located at Controllers/HttpView/AdminAjax/CatalogSelectWidgetAjaxController.inc.php

Methods summary

public init( void )

Init

public actionGetCategoriesTree( void ) : boolean|JsonHttpControllerResponse

Returns the categorie tree of the shop.

public actionGetProductsTree( void ) : boolean|JsonHttpControllerResponse

Returns the categorie tree of the shop including all products.

public actionGetProductsTreeAsOptgroups( void ) : boolean|JsonHttpControllerResponse

Returns the optgroup HTML for the categorie tree of the shop including all products.

protected _generateOptgroupsHtml( $data, $level = 1 ) : string

Generates the html for the dropdown of the products tree.

protected _isAdmin( void ) : boolean

Check if the customer is the admin.

protected _getCategoriesTreeData( boolean $withProducts = false, null $parentId = null ) : array

Collects the data for the categories tree.

protected _getCategoryProducts( null $categoryId = null ) : array

Collects the data of all products of a category.

Methods inherited from AdminHttpViewController

validateCurrentAdminStatus()

Methods inherited from HttpViewController

__construct(), _callActionMethod(), _getPostData(), _getPostDataCollection(), _getQueryParameter(), _getQueryParametersCollection(), _getServerData(), _render(), _validatePageToken(), actionDefault(), getTemplateFile(), proceed()

Properties summary

Properties inherited from HttpViewController

$assets, $contentView, $httpContextReader, $httpResponseProcessor, $postDataArray, $queryParametersArray, $serverDataArray