MilkCore

ModelList
in package

page: modellist.class.php La classe ModelList aiuta a gestisce la visualizzazione delle tabelle html a partire da una tabella mysql

Table of Contents

Properties

$db  : mixed
$default_limit  : mixed
$filters  : mixed
$fn_filter  : mixed
$limit  : mixed
$list_structure  : mixed
$order  : mixed
$order_dir  : mixed
$order_field  : mixed
$page  : mixed
$page_info  : mixed
$primary_key  : mixed
$table  : mixed
$table_id  : mixed
$table_structure  : mixed

Methods

__construct()  : mixed
Costruttore della classe ModelList
add_filter()  : mixed
Aggiunge un filtro di ricerca
filter_search()  : mixed
Filtra la query per la ricerca
get_data_chart()  : mixed
Draw chart
get_list_structure()  : mixed
La struttura delle colonne della tabella
get_page_info()  : PageInfo
Page_info sono le informazioni che servono alla tabella per funzionare
get_table_structure()  : ListStructure|array<string|int, mixed>|null
La struttura delle colonne della tabella
query_from_request()  : Query
Imposta i parametri della richiesta per la query
set_limit()  : mixed
Setta il limite di righe per pagina
set_list_structure()  : mixed
La struttura delle colonne della tabella [ 'row_field' => ['type'=>string, 'label' => string, 'primary' => bool] type: hidden, checkbox, text, select; label: il nome della colonna
set_no_order()  : mixed
Se si chiama questa funzione non viene impostato l'ordinamento
set_primary_key()  : mixed
set_request()  : mixed

Properties

Methods

__construct()

Costruttore della classe ModelList

public __construct(string $table[, string|null $table_id = null ][, mixed $db = null ]) : mixed
Parameters
$table : string

Nome della tabella

$table_id : string|null = null

ID della tabella (opzionale)

$db : mixed = null

add_filter()

Aggiunge un filtro di ricerca

public add_filter(mixed $filter_type, mixed $fn) : mixed
Parameters
$filter_type : mixed
$fn : mixed

Filtra la query per la ricerca

public filter_search(Query $query, mixed $search) : mixed
Parameters
$query : Query
$search : mixed

get_data_chart()

Draw chart

public get_data_chart(array<string|int, mixed> $data, array<string|int, mixed> $structure) : mixed
Parameters
$data : array<string|int, mixed>
$structure : array<string|int, mixed>

['label' => 'string', 'axis' => 'x|y'] Deve esserci un solo campo x poi gli altri sono y di default

get_list_structure()

La struttura delle colonne della tabella

public get_list_structure() : mixed

get_page_info()

Page_info sono le informazioni che servono alla tabella per funzionare

public get_page_info(int $total) : PageInfo
Parameters
$total : int

Numero totale di record

Return values
PageInfo

query_from_request()

Imposta i parametri della richiesta per la query

public query_from_request([mixed $request = null ]) : Query
Parameters
$request : mixed = null
Return values
Query

set_limit()

Setta il limite di righe per pagina

public set_limit(mixed $limit) : mixed
Parameters
$limit : mixed

set_list_structure()

La struttura delle colonne della tabella [ 'row_field' => ['type'=>string, 'label' => string, 'primary' => bool] type: hidden, checkbox, text, select; label: il nome della colonna

public set_list_structure(mixed $list_structure) : mixed
Parameters
$list_structure : mixed

set_no_order()

Se si chiama questa funzione non viene impostato l'ordinamento

public set_no_order() : mixed

set_primary_key()

public set_primary_key(mixed $primary_key) : mixed
Parameters
$primary_key : mixed

set_request()

public set_request(mixed $request) : mixed
Parameters
$request : mixed

        
On this page

Search results