TcInterface

This is the TcInterface.

This interface defines the methods to be defined by those 'theme configuration classes' that implement this interface.

Tags
see
TcInterface::routeTypeBatchRequestsFilter()
see
TcInterface::addBatchRequests()
see
TcInterface::getCalculatedData()
see
TcInterface::getConfigurationData()
see
TcInterface::runForbiddenResponse()

Table of Contents

FORBIDDEN_RESPONSE_ACTIONS  = [\FWK\Enums\RouteType::USER_ADDRESS_BOOK_ADD => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301], \FWK\Enums\RouteType::USER_ADDRESS_BOOK_EDIT => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301], \FWK\Enums\RouteType::CHANGE_PASSWORD_ANONYMOUS => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301], \FWK\Enums\RouteType::USER_ADDRESS_BOOK => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301], \FWK\Enums\RouteType::USER_CHANGE_PASSWORD => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301], \FWK\Enums\RouteType::USER_COMPLETE_ACCOUNT => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301], \FWK\Enums\RouteType::USER_DELETE_ACCOUNT => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301], \FWK\Enums\RouteType::USER_GIFT_CODES => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301], \FWK\Enums\RouteType::USER_ORDER => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301], \FWK\Enums\RouteType::USER_ORDERS => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301], \FWK\Enums\RouteType::USER_PAYMENT_CARDS => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301], \FWK\Enums\RouteType::USER_REWARD_POINTS => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301], \FWK\Enums\RouteType::USER_RMAS => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301], \FWK\Enums\RouteType::USER_SALES_AGENT => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301], \FWK\Enums\RouteType::USER_RECOMMENDED_BASKETS => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301], \FWK\Enums\RouteType::USER_SPONSORSHIP => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301], \FWK\Enums\RouteType::USER_STOCK_ALERTS => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301], \FWK\Enums\RouteType::USER_USER_WELCOME => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301], \FWK\Enums\RouteType::USER_WISHLIST => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301]]
addBatchRequests() This method adds the given BatchRequest for the 'theme configuration'.  : mixed
getCalculatedData() This method runs after send the 'theme configuration' batchRequest and here you can work with the response of the batch request or/and calculate some values that will be usable in all pages.  : array<string|int, mixed>
getConfigurationData() This method returns the 'theme configuration' data.  : array<string|int, mixed>
routeTypeBatchRequestsFilter() This method returns true if the 'theme configuration' allows to run/add batch requests for the given 'route type', it returns false otherwise.  : bool
runForbiddenResponse() This method runs the Response::redirect() method with the corresponding parameters based on the corresponding definition for the given routeType (that is defined in the self::FORBIDDEN_RESPONSE_ACTIONS constant).  : void

Constants

FORBIDDEN_RESPONSE_ACTIONS

public mixed FORBIDDEN_RESPONSE_ACTIONS = [\FWK\Enums\RouteType::USER_ADDRESS_BOOK_ADD => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301], \FWK\Enums\RouteType::USER_ADDRESS_BOOK_EDIT => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301], \FWK\Enums\RouteType::CHANGE_PASSWORD_ANONYMOUS => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301], \FWK\Enums\RouteType::USER_ADDRESS_BOOK => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301], \FWK\Enums\RouteType::USER_CHANGE_PASSWORD => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301], \FWK\Enums\RouteType::USER_COMPLETE_ACCOUNT => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301], \FWK\Enums\RouteType::USER_DELETE_ACCOUNT => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301], \FWK\Enums\RouteType::USER_GIFT_CODES => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301], \FWK\Enums\RouteType::USER_ORDER => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301], \FWK\Enums\RouteType::USER_ORDERS => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301], \FWK\Enums\RouteType::USER_PAYMENT_CARDS => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301], \FWK\Enums\RouteType::USER_REWARD_POINTS => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301], \FWK\Enums\RouteType::USER_RMAS => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301], \FWK\Enums\RouteType::USER_SALES_AGENT => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301], \FWK\Enums\RouteType::USER_RECOMMENDED_BASKETS => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301], \FWK\Enums\RouteType::USER_SPONSORSHIP => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301], \FWK\Enums\RouteType::USER_STOCK_ALERTS => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301], \FWK\Enums\RouteType::USER_USER_WELCOME => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301], \FWK\Enums\RouteType::USER_WISHLIST => [\FWK\Enums\TcDataItems::FORBIDDEN_ROUTE_TYPE => \FWK\Enums\RouteType::USER, \FWK\Enums\TcDataItems::FORBIDDEN_STATUS => 301]]

Methods

addBatchRequests()

This method adds the given BatchRequest for the 'theme configuration'.

public addBatchRequests(BatchRequests $requests, string $routeType) : mixed
Parameters
$requests : BatchRequests
$routeType : string
Return values
mixed

getCalculatedData()

This method runs after send the 'theme configuration' batchRequest and here you can work with the response of the batch request or/and calculate some values that will be usable in all pages.

public getCalculatedData(array<string|int, mixed> $batchResult) : array<string|int, mixed>
Parameters
$batchResult : array<string|int, mixed>
Return values
array<string|int, mixed>

getConfigurationData()

This method returns the 'theme configuration' data.

public getConfigurationData() : array<string|int, mixed>
Return values
array<string|int, mixed>

routeTypeBatchRequestsFilter()

This method returns true if the 'theme configuration' allows to run/add batch requests for the given 'route type', it returns false otherwise.

public routeTypeBatchRequestsFilter(string $routeType) : bool
Parameters
$routeType : string
Return values
bool

runForbiddenResponse()

This method runs the Response::redirect() method with the corresponding parameters based on the corresponding definition for the given routeType (that is defined in the self::FORBIDDEN_RESPONSE_ACTIONS constant).

public runForbiddenResponse(string $routeType) : void
Parameters
$routeType : string
Tags
see
self::FORBIDDEN_RESPONSE_ACTIONS
Return values
void

Search results