PHP Class MetaModels\FrontendIntegration\FrontendFilter

Mostrar archivo Open project: metamodels/core Class Usage Examples

Protected Properties

Property Type Description
$formId string The form id to use.
$objFilterConfig HybridFilterBlock Filter config.

Public Methods

Method Description
generateClearAll ( string $strContent, string $strTemplate ) : string Add the "clear all Filter".
getMetaModelFrontendFilter ( HybridFilterBlock $objFilterConfig ) : array Configure the filter module.

Protected Methods

Method Description
checkRedirect ( array $widgets, array $wantedParameter, array $allParameter ) : void Check if we want to redirect to another url.
generateContentElement ( string $content, string $replace, integer $contentId ) : string Render a content element.
generateElement ( string $table, string $content, string $replace, integer $elementId ) : string Render a module or content element.
generateModule ( string $content, string $replace, integer $moduleId ) : string Render a module.
getDispatcher ( ) : Symfony\Component\EventDispatcher\EventDispatcherInterface Retrieve the event dispatcher.
getFilters ( ) : array Get the filters.
getFrontendFilterOptions ( ) : MetaModels\FrontendIntegration\FrontendFilterOptions Get the frontend filter options to use.
getJumpToUrl ( array $arrParams ) : string Generate an url determined by the given params and configured jumpTo page.
getParams ( ) : array Retrieve the parameter values.
getWantedNames ( ) : array Retrieve the list of parameter names that shall be evaluated.
redirectPost ( array $arrParams ) : void Redirect the browser to the url determined by the given params (configured jumpTo page will get used).
renderWidget ( array $widget, MetaModels\FrontendIntegration\FrontendFilterOptions $filterOptions ) : array Parse a single filter widget.

Method Details

checkRedirect() protected method

Check if we want to redirect to another url.
protected checkRedirect ( array $widgets, array $wantedParameter, array $allParameter ) : void
$widgets array The widgets.
$wantedParameter array The wanted parameters.
$allParameter array The current parameters.
return void

generateClearAll() public method

This is called via parseTemplate HOOK to inject the "clear all" filter into fe_page.
public generateClearAll ( string $strContent, string $strTemplate ) : string
$strContent string The whole page content.
$strTemplate string The name of the template being parsed.
return string

generateContentElement() protected method

Render a content element.
protected generateContentElement ( string $content, string $replace, integer $contentId ) : string
$content string The html content in which to replace.
$replace string The string within the html to be replaced.
$contentId integer The id of the content element to be inserted for the replace string.
return string

generateElement() protected method

Render a module or content element.
protected generateElement ( string $table, string $content, string $replace, integer $elementId ) : string
$table string The name of the table.
$content string The html content in which to replace.
$replace string The string within the html to be replaced.
$elementId integer The id of the module/ce-element to be inserted for the replace string.
return string

generateModule() protected method

Render a module.
protected generateModule ( string $content, string $replace, integer $moduleId ) : string
$content string The html content in which to replace.
$replace string The string within the html to be replaced.
$moduleId integer The id of the module to be inserted for the replace string.
return string

getDispatcher() protected method

Retrieve the event dispatcher.
protected getDispatcher ( ) : Symfony\Component\EventDispatcher\EventDispatcherInterface
return Symfony\Component\EventDispatcher\EventDispatcherInterface

getFilters() protected method

Get the filters.
protected getFilters ( ) : array
return array

getFrontendFilterOptions() protected method

Get the frontend filter options to use.
protected getFrontendFilterOptions ( ) : MetaModels\FrontendIntegration\FrontendFilterOptions
return MetaModels\FrontendIntegration\FrontendFilterOptions

getJumpToUrl() protected method

Generate an url determined by the given params and configured jumpTo page.
protected getJumpToUrl ( array $arrParams ) : string
$arrParams array The URL parameters to use.
return string the generated URL.

getMetaModelFrontendFilter() public method

Configure the filter module.
public getMetaModelFrontendFilter ( HybridFilterBlock $objFilterConfig ) : array
$objFilterConfig HybridFilterBlock The content element or module using this filter.
return array

getParams() protected method

Retrieve the parameter values.
protected getParams ( ) : array
return array

getWantedNames() protected method

Retrieve the list of parameter names that shall be evaluated.
protected getWantedNames ( ) : array
return array

redirectPost() protected method

This will exit the script!
protected redirectPost ( array $arrParams ) : void
$arrParams array The URL parameters to use.
return void

renderWidget() protected method

Parse a single filter widget.
protected renderWidget ( array $widget, MetaModels\FrontendIntegration\FrontendFilterOptions $filterOptions ) : array
$widget array The widget configuration.
$filterOptions MetaModels\FrontendIntegration\FrontendFilterOptions The filter options to apply.
return array

Property Details

$formId protected_oe property

The form id to use.
protected string $formId
return string

$objFilterConfig protected_oe property

Filter config.
protected HybridFilterBlock,MetaModels\FrontendIntegration $objFilterConfig
return HybridFilterBlock