Documentation

AssettypeController extends MagnaRegulaController
in package

Tags
addtogroup

controllers Group of Controllers

@{

Table of Contents

Properties

$_escape_variables_onedit  : mixed
$_javascript_function1  : mixed
$_locale  : mixed
$_model  : mixed
$_name  : mixed
$_name_api_token  : mixed
$_name_session_token  : mixed
$_parent  : mixed
$_request  : mixed
$_token_id  : mixed
$domain  : mixed
$_admin_api_token  : mixed
$_cookie_duration  : mixed
$_dbconn_read  : mixed
$_dbconn_write  : mixed
$_delete_block  : mixed
$_delete_locale  : mixed
$_ESCAPEQUOTE_ONEDIT  : mixed
$_fields_to_format  : mixed
$_insert_block  : mixed
$_list_block_body  : mixed
$_list_block_footer  : mixed
$_list_block_header  : mixed
$_pk  : mixed
$_row  : mixed
$_sql_delete  : mixed
$_sql_inserts  : mixed
$_sql_list  : mixed
$_sql_list_all  : mixed
$_sql_load  : mixed
$_sql_load_by_key  : mixed
$_sql_updates  : mixed
$_update_block  : mixed
$_update_locale  : mixed
$_url_rest_base  : mixed
$_with_block_for_localize  : mixed
$_list_input_for_delete  : mixed
$_list_input_for_update  : mixed

Methods

__()  : mixed
__construct()  : mixed
__destruct()  : mixed
_append_to_file()  : none
records a line of text in a log file
_append_to_file_static()  : none
records a line of text in a log file
_build_block()  : mixed
_build_error_message()  : mixed
_build_html_select()  : mixed
_build_url_rest_base()  : mixed
_build_url_rest_for_delete()  : mixed
_build_url_rest_for_insert()  : mixed
_build_url_rest_with_pk()  : mixed
_build_url_update_with_pk()  : mixed
_check_fields_for_row()  : mixed
_connect_for_read()  : mixed
_connect_for_write()  : mixed
_default_action()  : array<string|int, mixed>
Returns NOTHING except the URI, exploded.
_delete()  : array<string|int, mixed>
Perform a DELETE In this Class, DO NOTHING.
_delete_locale()  : mixed
_format_node()  : mixed
_html_display_foredit()  : mixed
_html_display_message()  : mixed
_html_find_instance()  : mixed
_html_include_javascript()  : mixed
_html_list()  : mixed
_html_list_all()  : mixed
_html_list_locales()  : mixed
_html_retrieve_values()  : array<string|int, mixed>
Filters field values ($_REQUEST, ...) by keeping those having as prefix one of the values defined in $prefixes In this Class, DO NOTHING.
_include_subblocks()  : mixed
_init_html_vars()  : none
Initialize class variables containing HTML strings.
_init_model()  : mixed
_insert()  : array<string|int, mixed>
Perform an INSERT, by calling corresponding method in model
_is_a_token()  : bool
Check if the string given by parameter is structured as we look for (32 to 36 characters).
_is_owner_of()  : mixed
_is_token_valid()  : mixed
_match_includes()  : mixed
_normalize_int()  : mixed
_normalize_text()  : mixed
_perform_other_action_after_insert()  : mixed
_perform_other_action_after_update()  : mixed
_prepare_display_foredit()  : mixed
_prepare_text_list_body_for_delete()  : mixed
_prepare_text_list_body_for_update()  : mixed
_prepare_text_list_header()  : mixed
_set_cookie_token()  : none
send a cookie equal to the api_token. Only for TRUSTED applications
_translate_output()  : mixed
_translate_text()  : mixed
_update()  : array<string|int, mixed>
Perform an UPDATE, by calling corresponding method in model
_update_locale()  : mixed
admin()  : mixed
deleteAction()  : array<string|int, mixed>
Perform action on DELETE verb.
getAction()  : array<string|int, mixed>
Perform action on GET verb. If 'method' is set, redirects to <method>Action
html_manage_instance()  : mixed
load()  : array<string|int, mixed>
Loads a DB record.
load_by_key()  : array<string|int, mixed>
Loads a DB record.
patchAction()  : array<string|int, mixed>
Perform action on PATCH verb. Redirects ALWAYS to putAction()
postAction()  : array<string|int, mixed>
Perform action on POST verb. If 'method' is set, redirects to <method>Action
putAction()  : array<string|int, mixed>
Perform action on PUT verb.
sanitize_int_array()  : array<string|int, mixed>
Sanitize an array of numeric values, converted to pure integers
tblist()  : array<string|int, mixed>
Loads a list of records.

Properties

$_javascript_function1

public mixed $_javascript_function1 = <<<EOT <script language='Javascript'> function AskforDeletion(RefNumber) { var ret = confirm( "Voulez-vous VRAIMENT supprimer la ligne #" + RefNumber + " ?" ); return ret; } function MM_openBrWindow(theURL,winName,features) { //v2.0 var w=window.open(theURL,winName,features); w.focus(); } function OpenLink(theURL,title) { MM_openBrWindow(theURL,title,'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=1250,height=650'); } </script> EOT

$_name_api_token

public static mixed $_name_api_token = 'X-MagnaRegula-Api-Token'

$_name_session_token

public static mixed $_name_session_token = 'X-MagnaRegula-Session-Token'

$_admin_api_token

protected static mixed $_admin_api_token = '{04F04C15-B0EB-483E-7056-C5B82772DB24}'
protected static mixed $_cookie_duration = 7200

$_url_rest_base

protected mixed $_url_rest_base = "http://webservices.magna-regula.cloud/index.php/"

$_list_input_for_delete

private mixed $_list_input_for_delete = '<input type="submit" value="X">'

$_list_input_for_update

private mixed $_list_input_for_update = '<input type="submit" value="&gt;">'

Methods

__construct()

public __construct([mixed $_parent = NULL ]) : mixed
Parameters
$_parent : mixed = NULL

_append_to_file()

records a line of text in a log file

public _append_to_file(string $text) : none
Parameters
$text : string

The text to log.

Tags
since

Unknown

access

public

Return values
none

_append_to_file_static()

records a line of text in a log file

public static _append_to_file_static(string $text) : none
Parameters
$text : string

The text to log.

Tags
since

Unknown

access

public

Return values
none

_build_block()

public _build_block(mixed $blocktext, mixed $row[, mixed $clearvars = TRUE ]) : mixed
Parameters
$blocktext : mixed
$row : mixed
$clearvars : mixed = TRUE

_build_error_message()

public _build_error_message(mixed $errorcode) : mixed
Parameters
$errorcode : mixed

_build_html_select()

public _build_html_select(mixed $conf) : mixed
Parameters
$conf : mixed

_build_url_rest_for_delete()

public _build_url_rest_for_delete([mixed $action = 'delete' ]) : mixed
Parameters
$action : mixed = 'delete'

_build_url_rest_for_insert()

public _build_url_rest_for_insert([mixed $action = 'insert' ]) : mixed
Parameters
$action : mixed = 'insert'

_build_url_rest_with_pk()

public _build_url_rest_with_pk(mixed $pk[, mixed $action = NULL ]) : mixed
Parameters
$pk : mixed
$action : mixed = NULL

_build_url_update_with_pk()

public _build_url_update_with_pk(mixed $pk) : mixed
Parameters
$pk : mixed

_check_fields_for_row()

public _check_fields_for_row(mixed &$row) : mixed
Parameters
$row : mixed

_default_action()

Returns NOTHING except the URI, exploded.

public static _default_action(object $request) : array<string|int, mixed>
Parameters
$request : object

The request, built by class 'Request'

Tags
since

Unknown

access

public

Return values
array<string|int, mixed>

Array of the URI elements

_delete()

Perform a DELETE In this Class, DO NOTHING.

public _delete(mixed $_pk[, mixed $fields = NULL ]) : array<string|int, mixed>

See MagnaRegulaController.

Parameters
$_pk : mixed
$fields : mixed = NULL

Fields corresponding to column values

Return values
array<string|int, mixed>

An array containing error+rows

_delete_locale()

public _delete_locale(mixed $old_code) : mixed
Parameters
$old_code : mixed

_format_node()

public _format_node(mixed $column, mixed $columnvalue, mixed $formats) : mixed
Parameters
$column : mixed
$columnvalue : mixed
$formats : mixed

_html_display_foredit()

public _html_display_foredit([mixed $action = NULL ]) : mixed
Parameters
$action : mixed = NULL

_html_list()

public _html_list([mixed $action = NULL ]) : mixed
Parameters
$action : mixed = NULL

_html_list_all()

public _html_list_all([mixed $action = NULL ]) : mixed
Parameters
$action : mixed = NULL

_html_list_locales()

public _html_list_locales([mixed $action = NULL ][, mixed $row = NULL ]) : mixed
Parameters
$action : mixed = NULL
$row : mixed = NULL

_html_retrieve_values()

Filters field values ($_REQUEST, ...) by keeping those having as prefix one of the values defined in $prefixes In this Class, DO NOTHING.

public _html_retrieve_values([mixed $prefixes = array() ]) : array<string|int, mixed>

See MagnaRegulaController.

Parameters
$prefixes : mixed = array()

Array of strings to isolate _REQUEST values

Return values
array<string|int, mixed>

An array of fields to keep

_include_subblocks()

public _include_subblocks(mixed $text) : mixed
Parameters
$text : mixed

_init_html_vars()

Initialize class variables containing HTML strings.

public _init_html_vars() : none
Tags
since

Unknown

access

public

Return values
none

_insert()

Perform an INSERT, by calling corresponding method in model

public _insert([string $action = 'insert' ][, array<string|int, mixed> $fields = NULL ]) : array<string|int, mixed>
Parameters
$action : string = 'insert'

The action to perform ('insert' in most cases)

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

Fields corresponding to column values

Tags
since

Unknown

access

public

see
BaseModel::_insert()
Return values
array<string|int, mixed>

An array containing error+rows

_is_a_token()

Check if the string given by parameter is structured as we look for (32 to 36 characters).

public static _is_a_token(string $token) : bool
Parameters
$token : string

The string to check.

Tags
since

Unknown

access

public

Return values
bool

YES/NO, it looks like a token

_match_includes()

public _match_includes(mixed $matches) : mixed
Parameters
$matches : mixed

_normalize_text()

public _normalize_text(mixed $text, mixed $object[, mixed $clearvars = TRUE ][, mixed $escapequotes = TRUE ]) : mixed
Parameters
$text : mixed
$object : mixed
$clearvars : mixed = TRUE
$escapequotes : mixed = TRUE

_perform_other_action_after_insert()

public _perform_other_action_after_insert(mixed $action, mixed $return, mixed $params) : mixed
Parameters
$action : mixed
$return : mixed
$params : mixed

_perform_other_action_after_update()

public _perform_other_action_after_update(mixed $action, mixed $return, mixed $params) : mixed
Parameters
$action : mixed
$return : mixed
$params : mixed

_prepare_display_foredit()

public _prepare_display_foredit(mixed &$text, mixed &$row[, mixed $action = NULL ]) : mixed
Parameters
$text : mixed
$row : mixed
$action : mixed = NULL

_prepare_text_list_body_for_delete()

public _prepare_text_list_body_for_delete(mixed $text[, mixed $row = NULL ]) : mixed
Parameters
$text : mixed
$row : mixed = NULL

_prepare_text_list_body_for_update()

public _prepare_text_list_body_for_update(mixed $text[, mixed $row = NULL ][, mixed $action = NULL ]) : mixed
Parameters
$text : mixed
$row : mixed = NULL
$action : mixed = NULL

_prepare_text_list_header()

public _prepare_text_list_header(mixed $text) : mixed
Parameters
$text : mixed

send a cookie equal to the api_token. Only for TRUSTED applications

public static _set_cookie_token() : none
Tags
since

Unknown

access

public

Return values
none

_translate_output()

public _translate_output(mixed $result[, mixed $request = NULL ]) : mixed
Parameters
$result : mixed
$request : mixed = NULL

_translate_text()

public static _translate_text(mixed $text[, mixed $linuxlocale = NULL ]) : mixed
Parameters
$text : mixed
$linuxlocale : mixed = NULL

_update()

Perform an UPDATE, by calling corresponding method in model

public _update(int $_pk[, string $action = 'update' ][, array<string|int, mixed> $fields = NULL ]) : array<string|int, mixed>
Parameters
$_pk : int

The primary key

$action : string = 'update'

The action to perform ('update' in most cases)

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

Fields corresponding to column values

Tags
since

Unknown

access

public

see

MagnaRegulaModel::_update()q

Return values
array<string|int, mixed>

An array containing error+rows

_update_locale()

public _update_locale(mixed $old_code, mixed $new_code) : mixed
Parameters
$old_code : mixed
$new_code : mixed

deleteAction()

Perform action on DELETE verb.

public deleteAction(string $request) : array<string|int, mixed>
Parameters
$request : string

"Request" object

Tags
since

Unknown

access

public

see
BaseController::_delete()
Return values
array<string|int, mixed>

An array with 'error', 'message', 'row' or 'rows', ...

getAction()

Perform action on GET verb. If 'method' is set, redirects to <method>Action

public getAction(string $request) : array<string|int, mixed>
Parameters
$request : string

"Request" object

Tags
since

Unknown

access

public

see
BaseController::load()
see
BaseController::tb_list()
see
BaseController::admin()
see
BaseController::load_by_key()
see
BaseController::$method()
Return values
array<string|int, mixed>

An array with 'error', 'message', 'row' or 'rows', ...

load()

Loads a DB record.

public load(mixed $id[, mixed $control_owner = TRUE ]) : array<string|int, mixed>

In this Class, DO NOTHING. See MagnaRegulaController.

Parameters
$id : mixed

The primary key of the table.

$control_owner : mixed = TRUE
Return values
array<string|int, mixed>

An array containing error+row

load_by_key()

Loads a DB record.

public load_by_key(mixed $id) : array<string|int, mixed>

In this Class, DO NOTHING. See MagnaRegulaController.

Parameters
$id : mixed

The primary key of the table. Sometimes, could be a string and not a integer

Return values
array<string|int, mixed>

An array containing error+row

patchAction()

Perform action on PATCH verb. Redirects ALWAYS to putAction()

public patchAction(string $request) : array<string|int, mixed>
Parameters
$request : string

"Request" object

Tags
since

Unknown

access

public

see
BaseController::putAction()
Return values
array<string|int, mixed>

An array with 'error', 'message', 'row' or 'rows', ...

postAction()

Perform action on POST verb. If 'method' is set, redirects to <method>Action

public postAction(string $request) : array<string|int, mixed>
Parameters
$request : string

"Request" object

Tags
since

Unknown

access

public

see
BaseController::_insert()
Return values
array<string|int, mixed>

An array with 'error', 'message', 'row' or 'rows', ...

putAction()

Perform action on PUT verb.

public putAction(string $request) : array<string|int, mixed>
Parameters
$request : string

"Request" object

Tags
since

Unknown

access

public

see
BaseController::_update()
Return values
array<string|int, mixed>

An array with 'error', 'message', 'row' or 'rows', ...

sanitize_int_array()

Sanitize an array of numeric values, converted to pure integers

public static sanitize_int_array(array<string|int, mixed> $array) : array<string|int, mixed>
Parameters
$array : array<string|int, mixed>

The array (of numeric values) to sanitize.

Tags
since

Unknown

access

public

Return values
array<string|int, mixed>

The same array, but only with integer values; non-convertible values are dropped

tblist()

Loads a list of records.

public tblist() : array<string|int, mixed>

In this Class, DO NOTHING. See MagnaRegulaController.

Return values
array<string|int, mixed>

An array containing error+rows


        
On this page

Search results