class CRM_Campaign_Page_SurveyType extends CRM_Core_Page_Basic

Page for displaying list of Gender.

Properties

protected string $_name The name of the page (auto generated from class name) from CRM_Core_Page
protected object $_title The title associated with this page. from CRM_Core_Page
protected int $_mode A page can have multiple modes. (i.e. displays a different set of data based on the input from CRM_Core_Page
protected boolean $_embedded Is this object being embedded in another object. If so the display routine needs to not do any work. (The parent object takes care of the display) from CRM_Core_Page
protected boolean $_print Are we in print mode? if so we need to modify the display functionality to do a minimal display :) from CRM_Core_Page
static protected CRM_Core_Smarty $_template Cache the smarty template for efficiency reasons from CRM_Core_Page
static protected CRM_Core_Session $_session Cache the session for efficiency reasons from CRM_Core_Page
array $ajaxResponse What to return to the client if in ajax mode (snippet=json) from CRM_Core_Page
array $urlPath Url path used to reach this page from CRM_Core_Page
$useLivePageJS
protected $_action from CRM_Core_Page_Basic
$_links The action links that we need to display for the browse screen.
protected array $_gName The option group name.
protected array $_GName The option group name in display format (capitalized, without underscores.
protected array $_gid The option group id.

Methods

__construct(string $title = NULL, int $mode = NULL)

Class constructor.

run()

Run the basic page (run essentially starts execution for that page).

set(string|array $name, mixed $value = NULL)

Store the variable with the value in the form scope.

mixed
get(string $name)

Get the variable from the form scope.

assign(string $var, mixed $value = NULL)

Assign value to name in template.

assign_by_ref(string $var, mixed $value)

Assign value to name in template by reference.

append(array|string $tpl_var, mixed $value = NULL, bool $merge = FALSE)

Appends values to template variables.

array
get_template_vars(string $name = NULL)

Returns an array containing template variables.

reset()

Destroy all the session state of this page.

string
getTemplateFileName()

Use the form name to create the tpl file name.

getHookedTemplateFileName()

A wrapper for getTemplateFileName that includes calling the hook to prevent us from having to copy & paste the logic of calling the hook

string
overrideExtraTemplateFileName()

Default extra tpl file basically just replaces .tpl with .extra.tpl i.e. we dont override

setEmbedded(bool $embedded)

Setter for embedded.

bool
getEmbedded()

Getter for embedded.

setPrint(bool $print)

Setter for print.

bool
getPrint()

Getter for print.

static CRM_Core_Smarty
getTemplate()

No description

null
getVar(string $name)

No description

setVar(string $name, $value)

No description

assignFieldMetadataToTemplate(string $entity)

Assign metadata about fields to the template.

string
getBAOName()

Get BAO Name.

array
links()

Get action Links.

string
editForm()

Get name of edit form.

string
editName()

Get edit form name.

string
userContext(int $mode = NULL)

Get user context.

string
userContextParams(int $mode = NULL)

Get userContext params.

string
checkPermission(int $id, int $name)

Allow objects to be added based on permission.

addValues(CRM_Core_Controller $controller)

Allows the derived class to add some more state variables to the controller. By default does nothing, and hence is abstract

string
superRun()

No description

browse()

Browse all options.

action(CRM_Core_DAO $object, int $action, array $values, array $links, string $permission, bool $forceAction = FALSE)

Given an object, get the actions that can be associated with this object. Check the is_active and is_required flags to display valid actions

edit(int $mode, int $id = NULL, bool $imageUpload = FALSE, bool $pushUserContext = TRUE)

Edit this entity.

preProcess()

Obtains the group name from url and sets the title.

Details

in CRM_Core_Page_Basic at line 127
CRM_Core_Page __construct(string $title = NULL, int $mode = NULL)

Class constructor.

Parameters

string $title Title of the page.
int $mode Mode of the page.

Return Value

CRM_Core_Page

at line 136
run()

Run the basic page (run essentially starts execution for that page).

in CRM_Core_Page at line 245
set(string|array $name, mixed $value = NULL)

Store the variable with the value in the form scope.

Parameters

string|array $name name of the variable or an assoc array of name/value pairs
mixed $value Value of the variable if string.

in CRM_Core_Page at line 256
mixed get(string $name)

Get the variable from the form scope.

Parameters

string $name name of the variable

Return Value

mixed

in CRM_Core_Page at line 267
assign(string $var, mixed $value = NULL)

Assign value to name in template.

Parameters

string $var
mixed $value Value of variable.

in CRM_Core_Page at line 278
assign_by_ref(string $var, mixed $value)

Assign value to name in template by reference.

Parameters

string $var
mixed $value (reference) value of variable.

in CRM_Core_Page at line 290
append(array|string $tpl_var, mixed $value = NULL, bool $merge = FALSE)

Appends values to template variables.

Parameters

array|string $tpl_var the template variable name(s)
mixed $value The value to append.
bool $merge

in CRM_Core_Page at line 301
array get_template_vars(string $name = NULL)

Returns an array containing template variables.

Parameters

string $name

Return Value

array

in CRM_Core_Page at line 308
reset()

Destroy all the session state of this page.

in CRM_Core_Page at line 317
string getTemplateFileName()

Use the form name to create the tpl file name.

Return Value

string

in CRM_Core_Page at line 331
getHookedTemplateFileName()

A wrapper for getTemplateFileName that includes calling the hook to prevent us from having to copy & paste the logic of calling the hook

in CRM_Core_Page at line 343
string overrideExtraTemplateFileName()

Default extra tpl file basically just replaces .tpl with .extra.tpl i.e. we dont override

Return Value

string

in CRM_Core_Page at line 352
setEmbedded(bool $embedded)

Setter for embedded.

Parameters

bool $embedded

in CRM_Core_Page at line 362
bool getEmbedded()

Getter for embedded.

Return Value

bool return the embedded value

in CRM_Core_Page at line 371
setPrint(bool $print)

Setter for print.

Parameters

bool $print

in CRM_Core_Page at line 381
bool getPrint()

Getter for print.

Return Value

bool return the print value

in CRM_Core_Page at line 388
static CRM_Core_Smarty getTemplate()

Return Value

CRM_Core_Smarty

in CRM_Core_Page at line 397
null getVar(string $name)

Parameters

string $name

Return Value

null

in CRM_Core_Page at line 405
setVar(string $name, $value)

Parameters

string $name
$value

in CRM_Core_Page at line 422
protected assignFieldMetadataToTemplate(string $entity)

Assign metadata about fields to the template.

In order to allow the template to format fields we assign information about them to the template.

At this stage only date field metadata is assigned as that is the only use-case in play and we don't want to assign a lot of unneeded data.

Parameters

string $entity The entity being queried.

Exceptions

CiviCRM_API3_Exception

at line 93
string getBAOName()

Get BAO Name.

Return Value

string

Get action Links.

Return Value

array (reference)

at line 171
string editForm()

Get name of edit form.

Return Value

string

at line 181
string editName()

Get edit form name.

Return Value

string

at line 193
string userContext(int $mode = NULL)

Get user context.

Parameters

int $mode Mode that we are in.

Return Value

string

at line 205
string userContextParams(int $mode = NULL)

Get userContext params.

Parameters

int $mode Mode that we are in.

Return Value

string

in CRM_Core_Page_Basic at line 103
string checkPermission(int $id, int $name)

Allow objects to be added based on permission.

Parameters

int $id The id of the object.
int $name The name or title of the object.

Return Value

string permission value if permission is granted, else null

in CRM_Core_Page_Basic at line 114
addValues(CRM_Core_Controller $controller)

Allows the derived class to add some more state variables to the controller. By default does nothing, and hence is abstract

Parameters

CRM_Core_Controller $controller The controller object.

in CRM_Core_Page_Basic at line 181
string superRun()

Return Value

string

at line 144
browse()

Browse all options.

in CRM_Core_Page_Basic at line 285
action(CRM_Core_DAO $object, int $action, array $values, array $links, string $permission, bool $forceAction = FALSE)

Given an object, get the actions that can be associated with this object. Check the is_active and is_required flags to display valid actions

Parameters

CRM_Core_DAO $object The object being considered.
int $action The base set of actions.
array $values The array of values that we send to the template.
array $links The array of links.
string $permission The permission assigned to this object.
bool $forceAction

in CRM_Core_Page_Basic at line 365
edit(int $mode, int $id = NULL, bool $imageUpload = FALSE, bool $pushUserContext = TRUE)

Edit this entity.

Parameters

int $mode What mode for the form ?.
int $id Id of the entity (for update, view operations).
bool $imageUpload
bool $pushUserContext

at line 72
preProcess()

Obtains the group name from url and sets the title.