class CRM_Core_Block

Defines a simple implementation of a drupal block.

Blocks definitions and html are in a smarty template file.

Constants

CREATE_NEW

The following blocks are supported.

RECENTLY_VIEWED

The following blocks are supported.

DASHBOARD

The following blocks are supported.

ADD

The following blocks are supported.

LANGSWITCH

The following blocks are supported.

EVENT

The following blocks are supported.

FULLTEXT_SEARCH

The following blocks are supported.

Properties

static $_properties Template file names for the above blocks.

Methods

__construct()

Class constructor.

static 
initProperties()

Initialises the $_properties array

static string
getProperty(int $id, string $property)

Returns the desired property from the $_properties array

static 
setProperty(int $id, string $property, string $value)

Sets the desired property in the $_properties array

static array
properties()

Returns the whole $_properties array.

static array
getInfo()

Creates the info block for drupal.

static array
getContent(int $id)

Given an id creates a subject/content array

static array
fetch(int $id, string $fileName, array $properties)

Given an id and a template, fetch the contents

Details

at line 63
__construct()

Class constructor.

at line 69
static initProperties()

Initialises the $_properties array

at line 189
static string getProperty(int $id, string $property)

Returns the desired property from the $_properties array

Parameters

int $id One of the class constants (ADD, SEARCH, etc.).
string $property The desired property.

Return Value

string the value of the desired property

at line 206
static setProperty(int $id, string $property, string $value)

Sets the desired property in the $_properties array

Parameters

int $id One of the class constants (ADD, SEARCH, etc.).
string $property The desired property.
string $value The value of the desired property.

at line 219
static array properties()

Returns the whole $_properties array.

Return Value

array the $_properties array

at line 231
static array getInfo()

Creates the info block for drupal.

Return Value

array

at line 569
static array getContent(int $id)

Given an id creates a subject/content array

Parameters

int $id Id of the block.

Return Value

array

at line 650
static array fetch(int $id, string $fileName, array $properties)

Given an id and a template, fetch the contents

Parameters

int $id Id of the block.
string $fileName Name of the template file.
array $properties Template variables.

Return Value

array