class CRM_Core_Region

Maintain a set of markup/templates to inject inside various regions

Properties

string $_name Symbolic name of this region
array; $_snippets List of snippets to inject within region
boolean $_isSorted Whether the snippets array has been sorted

Methods

static CRM_Core_Region
instance(string $name, bool $autocreate = TRUE)

Obtain the content for a given region.

__construct(string $name)

No description

array
add(array $snippet)

Add a snippet of content to a region.

update(string $name, $snippet)

No description

mixed
get(string $name)

Get snippet.

string,
render(string $default, bool $allowCmsOverride = TRUE)

Render all the snippets in a region.

static int
_cmpSnippet($a, $b)

No description

Details

at line 17
static CRM_Core_Region instance(string $name, bool $autocreate = TRUE)

Obtain the content for a given region.

Parameters

string $name
bool $autocreate Whether to automatically create an empty region.

Return Value

CRM_Core_Region

at line 48
__construct(string $name)

Parameters

string $name

at line 105
array add(array $snippet)

Add a snippet of content to a region.

Parameters

array $snippet Array; keys:. - type: string (auto-detected for markup, template, callback, script, scriptUrl, jquery, style, styleUrl) - name: string, optional - weight: int, optional; default=1 - disabled: int, optional; default=0 - markup: string, HTML; required (for type==markup) - template: string, path; required (for type==template) - callback: mixed; required (for type==callback) - arguments: array, optional (for type==callback) - script: string, Javascript code - scriptUrl: string, URL of a Javascript file - jquery: string, Javascript code which runs inside a jQuery(function($){...}); block - style: string, CSS code - styleUrl: string, URL of a CSS file

Return Value

array

at line 135
update(string $name, $snippet)

Parameters

string $name
$snippet

at line 147
mixed get(string $name)

Get snippet.

Parameters

string $name

Return Value

mixed

at line 160
string, render(string $default, bool $allowCmsOverride = TRUE)

Render all the snippets in a region.

Parameters

string $default HTML, the initial content of the region.
bool $allowCmsOverride Allow CMS to override rendering of region.

Return Value

string, HTML

at line 238
static int _cmpSnippet($a, $b)

Parameters

$a
$b

Return Value

int