ZenMagick 0.9.10


zenmagick.store.shared.services\ZMCatalogContentController
mvc\controller\ZMCatalogContentController.php at line 36

Class ZMCatalogContentController

ZMObject
└─ZMController
└─ZMCatalogContentController

public abstract class ZMCatalogContentController
extends ZMController

Catalog content controller.

This class implements a special case findView() method to allow easy redirects to the same page.

Author:
DerManoMann

Constant Summary
final static int

ACTIVE_CATEGORY

final static int

ACTIVE_PRODUCT

Field Summary
protected mixed

$catalogRequestId_

protected mixed

$name_

Method Summary
void

__construct(mixed catalogRequestId, string name, int active, string requestId)

Create new instance.

ZMView

findView(string id, array data, array parameter)

Lookup the appropriate view for the given name. Adds special handling to 'catalog-redirect' == $id to allow proper redirects after POST handling without the subclass having to worry about details. All other parameters will be handled as always.

string

getCatalogRequestId()

Query the (catalog) request id this controller handles.

string

getName()

Get the name.

boolean

isActive(ZMRequest request)

Query whether this content is active for the given request.

ZMView

process(ZMRequest request)

{@inheritDoc}

Methods inherited from org.zenmagick.mvc.controller\ZMController
__construct, findView, getFormData, getId, getView, getViewData, isAjax, isFormSubmit, preProcess, process, processGet, processPost, setContentType, setId, setView, validate, validateFormData, validateSession
Methods inherited from org.zenmagick.core\ZMObject
__construct, attachMethod, get, getAttachedMethods, getProperties, getPropertyNames, set, singleton

Constant Detail

mvc\controller\ZMCatalogContentController.php at line 37

ACTIVE_CATEGORY

public final static int ACTIVE_CATEGORY = 1

mvc\controller\ZMCatalogContentController.php at line 38

ACTIVE_PRODUCT

public final static int ACTIVE_PRODUCT = 2

Field Detail

mvc\controller\ZMCatalogContentController.php at line 39

catalogRequestId_

protected mixed $catalogRequestId_

mvc\controller\ZMCatalogContentController.php at line 40

name_

protected mixed $name_

Method Detail

mvc\controller\ZMCatalogContentController.php at line 51

__construct

public void __construct(mixed catalogRequestId, string name, int active, string requestId)

Create new instance.

Parameters:
requestId - Catalog requestId.
name - The name.
active - Active flag; example: ACTIVE_CATEGORY|ACTIVE_PRODUCT; default is 0.

mvc\controller\ZMCatalogContentController.php at line 118

findView

public ZMView findView(string id, array data, array parameter)

Lookup the appropriate view for the given name.

Adds special handling to 'catalog-redirect' == $id to allow proper redirects after POST handling without the subclass having to worry about details.
All other parameters will be handled as always.

Parameters:
id - The controller id or null to return to the current page.
data - Optional model data; default is an empty array.
parameter - Optional map of name/value pairs to further configure the view; default is null.
Returns:
The actual view to be used to render the response.

mvc\controller\ZMCatalogContentController.php at line 84

getCatalogRequestId

public string getCatalogRequestId()

Query the (catalog) request id this controller handles.

Returns:
The request id this controller is responsible for.

mvc\controller\ZMCatalogContentController.php at line 93

getName

public string getName()

Get the name.

Returns:
The name.

mvc\controller\ZMCatalogContentController.php at line 68

isActive

public boolean isActive(ZMRequest request)

Query whether this content is active for the given request.

Subclasses can control this by either setting the active (bit-)flags in the constructor or by overriding this method.

Parameters:
request - The current request.
Returns:
true if the plugin requests to be rendered for this request.

mvc\controller\ZMCatalogContentController.php at line 100

process

public ZMView process(ZMRequest request)

Process a HTTP request.

Supported request methods are GET and POST.

This method should not be overridded!.

Parameters:
request - The request to process.
Returns:
A ZMView instance or null.

ZenMagick 0.9.10