class CRM_Core_ShowHideBlocks

Properties

static string $_showIcon The icons prefixed to block show and hide links.
static string $_hideIcon The icons prefixed to block show and hide links.
protected array $_show The array of ids of blocks that will be shown.
protected array $_hide The array of ids of blocks that will be hidden.

Methods

__construct(array $show = NULL, array $hide = NULL)

Class constructor.

static 
setIcons()

Load icon vars used in hide and show links.

addToTemplate()

Add the values from this class to the template.

addShow(string $name)

Add a value to the show array.

addHide(string $name)

Add a value to the hide array.

static string
linkHtml(string $name, string $href, string $text, string $js)

Create a well formatted html link from the smaller pieces.

static array
links(CRM_Core_Form $form, string $prefix, string $showLinkText, string $hideLinkText, bool $assign = TRUE)

Create links that we can use in the form.

linksForArray(CRM_Core_Form $form, int $index, int $maxIndex, string $prefix, string $showLinkText, string $hideLinkText, string $elementType = NULL, string $hideLink = NULL)

Create html link elements that we can use in the form.

Details

at line 66
CRM_Core_ShowHideBlocks __construct(array $show = NULL, array $hide = NULL)

Class constructor.

Parameters

array $show Initial value of show array.
array $hide Initial value of hide array.

Return Value

CRM_Core_ShowHideBlocks the newly created object

at line 85
static setIcons()

Load icon vars used in hide and show links.

at line 96
addToTemplate()

Add the values from this class to the template.

at line 128
addShow(string $name)

Add a value to the show array.

Parameters

string $name Id to be added.

at line 141
addHide(string $name)

Add a value to the hide array.

Parameters

string $name Id to be added.

at line 160
static string linkHtml(string $name, string $href, string $text, string $js)

Create a well formatted html link from the smaller pieces.

Parameters

string $name Name of the link.
string $href
string $text
string $js

Return Value

string the formatted html link

Create links that we can use in the form.

Parameters

CRM_Core_Form $form The form object.
string $prefix The attribute that we are referencing.
string $showLinkText The text to be shown for the show link.
string $hideLinkText The text to be shown for the hide link.
bool $assign

Return Value

array

at line 217
linksForArray(CRM_Core_Form $form, int $index, int $maxIndex, string $prefix, string $showLinkText, string $hideLinkText, string $elementType = NULL, string $hideLink = NULL)

Create html link elements that we can use in the form.

Parameters

CRM_Core_Form $form The form object.
int $index The current index of the element being processed.
int $maxIndex The max number of elements that will be processed.
string $prefix The attribute that we are referencing.
string $showLinkText The text to be shown for the show link.
string $hideLinkText The text to be shown for the hide link.
string $elementType The set the class.
string $hideLink The hide block string.