FacturaScripts

BaseController extends BaseController
in package

AbstractYes

Class created by Core/Internal/PluginsDeploy

Table of Contents

Constants

MODEL_NAMESPACE  = '\FacturaScripts\Dinamic\Model\\'

Properties

$active  : string
Indicates the active view.
$codeModel  : CodeModel
Model to use with select and autocomplete filters.
$empresa  : Empresa
Selected company.
$exportManager  : ExportManager
Object to export data.
$multiRequestProtection  : MultiRequestProtection
$permissions  : ControllerPermissions
User permissions on this controller.
$request  : Request
Request on which we can get data.
$title  : string
Title of the page.
$uri  : string
Given uri, default is empty.
$user  : User|false
User logged in.
$views  : array<string|int, BaseView>
List of views displayed by the controller.
$dataBase  : DataBase
It provides direct access to the database.
$response  : Response
HTTP Response object.

Methods

__construct()  : mixed
Initializes all the objects and properties.
addButton()  : BaseView
Adds a new button to the tab.
addCustomView()  : BaseView
addExtension()  : mixed
getCurrentView()  : BaseView
getMainViewName()  : string
Returns the name assigned to the main view
getPageData()  : array<string|int, mixed>
Return the basic data for this page.
getSettings()  : mixed
Returns the configuration value for the indicated view.
getTemplate()  : string|false
Return the template to use for this controller.
getViewModelValue()  : mixed
Return the value for a field in the model of the view.
listView()  : ListView
pipe()  : mixed
pipeFalse()  : bool
privateCore()  : mixed
Runs the controller's private logic.
publicCore()  : mixed
Execute the public part of the controller.
redirect()  : mixed
Redirect to an url or controller.
request()  : Request
run()  : void
setCurrentView()  : void
setSettings()  : BaseView
Set value for setting of a view
setTemplate()  : bool
Set the template to use for this controller.
tab()  : BaseView
url()  : string
Return the URL of the actual controller.
autocompleteAction()  : array<string|int, mixed>
Run the autocomplete action.
checkOwnerData()  : bool
Returns true if the active user has permission to view the information of the active record in the informed model.
createViews()  : mixed
Inserts the views or tabs to display.
datalistAction()  : array<string|int, mixed>
Run the datalist action.
db()  : DataBase
deleteAction()  : bool
Action to delete data.
exportAction()  : mixed
getAutocompleteValues()  : array<string|int, mixed>
Return values from Widget Values for autocomplete action
getClassName()  : string
Return the name of the controller.
loadData()  : mixed
Loads the data to display.
requestGet()  : array<string|int, mixed>
Return array with parameters values
response()  : Response
selectAction()  : array<string|int, mixed>
Run the select action.
validateFormToken()  : bool
Check request token. Returns an error if: - the token does not exist - the token is invalid - the token is duplicated

Constants

MODEL_NAMESPACE

public mixed MODEL_NAMESPACE = '\FacturaScripts\Dinamic\Model\\'

Properties

$title

Title of the page.

public string $title

título de la página.

$uri

Given uri, default is empty.

public string $uri

Methods

__construct()

Initializes all the objects and properties.

public __construct(string $className[, string $uri = '' ]) : mixed
Parameters
$className : string
$uri : string = ''

addButton()

Adds a new button to the tab.

public addButton(string $viewName, array<string|int, mixed> $btnArray) : BaseView
Parameters
$viewName : string
$btnArray : array<string|int, mixed>
Return values
BaseView

addExtension()

public static addExtension(mixed $extension) : mixed
Parameters
$extension : mixed

getMainViewName()

Returns the name assigned to the main view

public getMainViewName() : string
Return values
string

getPageData()

Return the basic data for this page.

public getPageData() : array<string|int, mixed>
Return values
array<string|int, mixed>

getSettings()

Returns the configuration value for the indicated view.

public getSettings(string $viewName, string $property) : mixed
Parameters
$viewName : string
$property : string

getTemplate()

Return the template to use for this controller.

public getTemplate() : string|false
Return values
string|false

getViewModelValue()

Return the value for a field in the model of the view.

public getViewModelValue(string $viewName, string $fieldName) : mixed
Parameters
$viewName : string
$fieldName : string

pipe()

public pipe(string $name, array<string|int, mixed> ...$arguments) : mixed
Parameters
$name : string
$arguments : array<string|int, mixed>

pipeFalse()

public pipeFalse(string $name, array<string|int, mixed> ...$arguments) : bool
Parameters
$name : string
$arguments : array<string|int, mixed>
Return values
bool

publicCore()

Execute the public part of the controller.

public publicCore(Response &$response) : mixed
Parameters
$response : Response

redirect()

Redirect to an url or controller.

public redirect(string $url[, int $delay = 0 ]) : mixed
Parameters
$url : string
$delay : int = 0

setCurrentView()

public setCurrentView(string $viewName) : void
Parameters
$viewName : string

setSettings()

Set value for setting of a view

public setSettings(string $viewName, string $property, mixed $value) : BaseView
Parameters
$viewName : string
$property : string
$value : mixed
Return values
BaseView

setTemplate()

Set the template to use for this controller.

public setTemplate(string|false $template) : bool
Parameters
$template : string|false
Return values
bool

url()

Return the URL of the actual controller.

public url() : string
Return values
string

autocompleteAction()

Run the autocomplete action.

protected autocompleteAction() : array<string|int, mixed>

Returns a JSON string for the searched values.

Return values
array<string|int, mixed>

checkOwnerData()

Returns true if the active user has permission to view the information of the active record in the informed model.

protected checkOwnerData(ModelClass $model) : bool
Parameters
$model : ModelClass
Return values
bool

createViews()

Inserts the views or tabs to display.

protected abstract createViews() : mixed

datalistAction()

Run the datalist action.

protected datalistAction() : array<string|int, mixed>

Returns a JSON string for the searched values.

Return values
array<string|int, mixed>

deleteAction()

Action to delete data.

protected deleteAction() : bool
Return values
bool

getAutocompleteValues()

Return values from Widget Values for autocomplete action

protected getAutocompleteValues(string $viewName, string $fieldName) : array<string|int, mixed>
Parameters
$viewName : string
$fieldName : string
Return values
array<string|int, mixed>

getClassName()

Return the name of the controller.

protected getClassName() : string
Return values
string

loadData()

Loads the data to display.

protected abstract loadData(string $viewName, BaseView $view) : mixed
Parameters
$viewName : string
$view : BaseView

requestGet()

Return array with parameters values

protected requestGet(array<string|int, mixed> $keys) : array<string|int, mixed>
Parameters
$keys : array<string|int, mixed>
Return values
array<string|int, mixed>

selectAction()

Run the select action.

protected selectAction() : array<string|int, mixed>

Returns a JSON string for the searched values.

Return values
array<string|int, mixed>

validateFormToken()

Check request token. Returns an error if: - the token does not exist - the token is invalid - the token is duplicated

protected validateFormToken() : bool
Return values
bool

        
On this page

Search results