Documentation

SetupController
in package
implements SetupControllerInterface

Table of Contents

Interfaces

SetupControllerInterface

Constants

PREFIX  = 'civisetup'

Properties

$blocks  : array<string|int, mixed>
$setup  : Setup
$urls  : array<string|int, mixed>

Methods

__construct()  : mixed
SetupController constructor.
createError()  : SetupResponse
createPage()  : SetupResponse
getResourcePath()  : mixed
getSetup()  : Setup
getUrl()  : mixed
render()  : string
Render a *.php template file.
renderBlocks()  : mixed
run()  : SetupResponse
runInstall()  : SetupResponse
Perform the installation action.
runStart()  : SetupResponse
Run the main installer page.
setUrls()  : $this
boot()  : mixed
Partially bootstrap Civi services (such as localization).
parseAction()  : string
Given an HTML submission, determine the name.
getCommonTplVars()  : array<string|int, mixed>
renderAlreadyInstalled()  : mixed
renderFinished()  : SetupResponse

Constants

Properties

$blocks

public array<string|int, mixed> $blocks

A list of blocks to display on the setup page. Each item has:

  • file: string, relative path
  • class: string, a space-delimited list of CSS classes
  • is_active: bool

Note: When rendering a block, content of the block's definition will be available as $_tpl_block. For example, $_tpl_block['is_active'] would be the same boolean.

$urls

protected array<string|int, mixed> $urls

Some mix of the following:

  • res: The base URL for loading resource files (images/javascripts) for this project. Includes trailing slash.
  • ctrl: The URL of this setup controller. May be used for POST-backs.

Methods

getResourcePath()

public getResourcePath(mixed $parts) : mixed
Parameters
$parts : mixed

getUrl()

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

render()

Render a *.php template file.

public render(string $_tpl_file[, array<string|int, mixed> $_tpl_params = array() ]) : string
Parameters
$_tpl_file : string

The path to the file.

$_tpl_params : array<string|int, mixed> = array()

Any variables that should be exported to the scope of the template.

Return values
string

renderBlocks()

public renderBlocks(mixed $_tpl_params) : mixed
Parameters
$_tpl_params : mixed

run()

public run(string $method[, array<string|int, mixed> $fields = array() ]) : SetupResponse
Parameters
$method : string

Ex: 'GET' or 'POST'.

$fields : array<string|int, mixed> = array()

List of any HTTP GET/POST fields.

Return values
SetupResponse

runInstall()

Perform the installation action.

public runInstall(string $method, array<string|int, mixed> $fields) : SetupResponse
Parameters
$method : string

Ex: 'GET' or 'POST'.

$fields : array<string|int, mixed>

List of any HTTP GET/POST fields.

Return values
SetupResponse

runStart()

Run the main installer page.

public runStart(string $method, array<string|int, mixed> $fields) : SetupResponse
Parameters
$method : string

Ex: 'GET' or 'POST'.

$fields : array<string|int, mixed>

List of any HTTP GET/POST fields.

Return values
SetupResponse

setUrls()

public setUrls(mixed $urls) : $this
Parameters
$urls : mixed

Some mix of the following:

  • res: The base URL for loading resource files (images/javascripts) for this project. Includes trailing slash.
  • ctrl: The URL of this setup controller. May be used for POST-backs.
Tags
inheritdoc
Return values
$this

boot()

Partially bootstrap Civi services (such as localization).

protected boot(mixed $method, mixed $fields) : mixed
Parameters
$method : mixed
$fields : mixed

parseAction()

Given an HTML submission, determine the name.

protected parseAction(array<string|int, mixed> $fields, string $default) : string
Parameters
$fields : array<string|int, mixed>

HTTP inputs -- e.g. with a form element like this: <button type="submit" name="civisetup[action][Foo]">Do the foo</button>

$default : string

The action-name to return if no other action is identified.

Return values
string

The name of the action. Ex: 'Foo'.

getCommonTplVars()

private getCommonTplVars() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results