Heratio Framework API Reference

AhgComponents extends sfComponents
in package

Base component class for AHG plugins.

Extends sfComponents with automatic framework bootstrap and modern helpers. Plugin component classes should extend this instead of sfComponents directly.

Usage: class myComponents extends AhgComponents { public function executeWidget(sfWebRequest $request) { // Framework is already bootstrapped $culture = $this->culture(); } }

Table of Contents

Methods

__get()  : mixed
__isset()  : mixed
__set()  : mixed
__unset()  : mixed
execute()  : string
Dispatch to the appropriate execute method.
generateUrl()  : string
Generate a URL.
getActionName()  : string
getContext()  : sfContext
getController()  : sfController
getModuleName()  : string
getPartial()  : string
Get a partial template as a string.
getRequest()  : sfWebRequest
getRequestParameter()  : mixed
getResponse()  : sfWebResponse
getUser()  : sfUser
getVar()  : mixed
getVarHolder()  : sfParameterHolder
hasRequestParameter()  : bool
hasVar()  : bool
Check if a template variable exists.
initialize()  : mixed
Initialize the component.
logMessage()  : mixed
Log a message via event dispatcher.
postExecute()  : mixed
preExecute()  : mixed
Auto-bootstrap the framework before every component.
renderPartial()  : mixed
Include a partial template.
renderText()  : string
Render inline text (returns sfView::NONE).
setVar()  : mixed

Methods

__get()

public & __get(mixed $name) : mixed
Parameters
$name : mixed

__isset()

public __isset(mixed $name) : mixed
Parameters
$name : mixed

__set()

public __set(mixed $name, mixed $value) : mixed
Parameters
$name : mixed
$value : mixed

__unset()

public __unset(mixed $name) : mixed
Parameters
$name : mixed

generateUrl()

Generate a URL.

public generateUrl(string $route[, array<string|int, mixed> $params = [] ][, bool $absolute = false ]) : string
Parameters
$route : string

Route name or module/action

$params : array<string|int, mixed> = []

Parameters

$absolute : bool = false

Generate absolute URL

Return values
string

getActionName()

public getActionName() : string
Return values
string

getController()

public getController() : sfController
Return values
sfController

getModuleName()

public getModuleName() : string
Return values
string

getPartial()

Get a partial template as a string.

public getPartial(string $templateName[, array<string|int, mixed> $vars = [] ]) : string
Parameters
$templateName : string

module/partial or just partial

$vars : array<string|int, mixed> = []
Return values
string

getRequestParameter()

public getRequestParameter(string $name[, mixed $default = null ]) : mixed
Parameters
$name : string
$default : mixed = null

getResponse()

public getResponse() : sfWebResponse
Return values
sfWebResponse

getUser()

public getUser() : sfUser
Return values
sfUser

getVar()

public getVar(string $name) : mixed
Parameters
$name : string

hasRequestParameter()

public hasRequestParameter(string $name) : bool
Parameters
$name : string
Return values
bool

hasVar()

Check if a template variable exists.

public hasVar(string $name) : bool
Parameters
$name : string
Return values
bool

initialize()

Initialize the component.

public initialize(sfContext $context, string $moduleName, string $actionName) : mixed
Parameters
$context : sfContext
$moduleName : string
$actionName : string

logMessage()

Log a message via event dispatcher.

public logMessage(string $message[, string $priority = 'info' ]) : mixed
Parameters
$message : string
$priority : string = 'info'

'info', 'warning', 'error', etc.

preExecute()

Auto-bootstrap the framework before every component.

public preExecute() : mixed

renderPartial()

Include a partial template.

public renderPartial(mixed $templateName[, mixed $vars = [] ]) : mixed
Parameters
$templateName : mixed
$vars : mixed = []

renderText()

Render inline text (returns sfView::NONE).

public renderText(string $text) : string
Parameters
$text : string
Return values
string

sfView::NONE

setVar()

public setVar(string $name, mixed $value[, bool $safe = false ]) : mixed
Parameters
$name : string
$value : mixed
$safe : bool = false

Mark value as safe for output escaping


        
On this page

Search results