PHP Class PHPFusion\QuantumFields

Inheritance: extends SqlHandler
Afficher le fichier Open project: php-fusion/PHP-Fusion Class Usage Examples

Protected Properties

Свойство Type Description
$admin_rights string Set the admin rights to Quantum Fields Admin
$callback_data array feed $userData or $data here to append display_fields() values use the setter function setCallbackData()
$cat_list maybe can mix with enabled_fields.
$category_db Set the Database to install field structure records Refer to v7.x User Fields Structrue
$debug debug mode
$dom_debug
$field_db
$fields callback on the structure - use getters
$method string Set as display to show array values output Two methods - input or display
$module_debug
$plugin_folder Set system API folder paths Refer to v7.x User Fields API
$plugin_locale_folder
$system_title Set the Quantum System Fields Page Title

Méthodes publiques

Méthode Description
calculate_byte ( $download_max_b )
displayQuantumAdmin ( ) * Outputs Quantum Admin Button Sets
display_all_fields ( ) * Hardcoded Column Attributes - Can be added to forms but is it too technical for non coders?
display_fields ( array $data, $callback_data, string $method = 'input', array $options = [] ) : array | boolean | string Display fields for each fieldDB record entry
fusion_getlocale ( $data, $input_name )
getCatList ( ) : array
getFields ( null $key = NULL ) : array Get results from running load_structure
get_dynamics_type ( )
install_quantum ( ) : array Quantum Installer for 3rd party applications
is_serialized ( $value, &$result = NULL )
load_field_cats ( ) Returns $this->page_list and $this->cat_list
load_fields ( )
log_user_action ( $db, $primary_key )
parse_label ( $value ) : string Parse the correct label language. Requires serialized $value.
quantum_admin_buttons ( ) * The Current Stable PHP-Fusion Dynamics Module
quantum_category_form ( )
quantum_insert ( array $data = [] )
quantum_multilocale_fields ( $input_name, $title, $input_value, array $options = [] ) : string Multiple locale fields input
return_fields_input ( $db, $primary_key, $callback_data = FALSE ) : array Return sanitized post values of input fields
serialize_fields ( $input_name ) Short serialization function
setAdminRights ( string $admin_rights ) The internal admin rights by a user to use this system.
setCallbackData ( array $callback_data ) Additional data-id referencing.
setCategoryDb ( string $category_db ) Database Handler for Category Structuring If it does not exist, quantum will automatically build a template onload.
setFieldDb ( string $field_db ) Database Handler for Field Structuring If it does not exist, quantum will automatically build a template onload.
setLocale ( $locale ) Set Quantum system locale
setMethod ( string $method ) input renders field.
setPluginFolder ( string $plugin_folder_path ) If modules are used, specify fields module path API follows Version 7.00's User Fields module.
setPluginLocaleFolder ( $locale_folder_path ) If modules are used, specify fields module locale libs folder path API follows Version 7.00's User Fields Module.
setSystemTitle ( string $system_title ) Give your Quantum based system a name. Will add to breadcrumbs if available.

Private Methods

Méthode Description
_delete_category ( )
_delete_fields ( )
_move_fields ( ) ### SQL Actions ###
create_fields ( $data, $type = 'dynamics' ) Field Creation
display_module_form ( ) Modules Form
dynamics_fieldinfo ( $type, $default_value )
get_available_modules ( ) ### Getters ####
quantum_dynamics_form ( ) The master form for Adding or Editing Dynamic Fields
validate_field ( $field_id ) * Execution of delete fields
validate_fieldCat ( $field_cat_id ) * Move Fields Order - Up and Down

Method Details

calculate_byte() public méthode

public calculate_byte ( $download_max_b )

displayQuantumAdmin() public méthode

* Outputs Quantum Admin Button Sets
public displayQuantumAdmin ( )

display_all_fields() public méthode

* Hardcoded Column Attributes - Can be added to forms but is it too technical for non coders?
public display_all_fields ( )

display_fields() public méthode

Display fields for each fieldDB record entry
public display_fields ( array $data, $callback_data, string $method = 'input', array $options = [] ) : array | boolean | string
$data array The array of the user field.
$callback_data
$method string input or display. In case of any other value the method return FALSE. See the description of return for more details.
$options array
  • deactivate (boolean): FALSE by default. disable fields
  • debug (bolean): FALSE by default. Show some information to debug.
  • encrypt (boolean): FALSE by default. encrypt field names
  • error_text (string): empty string by default. sets the field error text
  • hide_value (boolean): FALSE by default. input value is not shown on fields render
  • inline (boolean): FALSE by default. sets the field inline
  • required (boolean): FALSE by default. input must be filled when validate
  • show_title (boolean): FALSE by default. display field label
  • placeholder (string): empty string by default. helper text in field value
  • plugin_folder (string): INCLUDES.'user_fields/' by default The folder's path where the field's source files are.
  • plugin_locale_folder (string): LOCALE.LOCALESET.'/user_fields/' by default. The folder's path where the field's locale files are.
Résultat array | boolean | string
  • FALSE on failure
  • string if $method 'display'
  • array if $method is 'input'

fusion_getlocale() public static méthode

public static fusion_getlocale ( $data, $input_name )

getCatList() public méthode

public getCatList ( ) : array
Résultat array

getFields() public méthode

Get results from running load_structure
public getFields ( null $key = NULL ) : array
$key null
Résultat array

get_dynamics_type() public méthode

public get_dynamics_type ( )

install_quantum() public méthode

Quantum Installer for 3rd party applications
public install_quantum ( ) : array
Résultat array

is_serialized() public static méthode

public static is_serialized ( $value, &$result = NULL )

load_field_cats() public méthode

Returns $this->page_list and $this->cat_list
public load_field_cats ( )

load_fields() public méthode

public load_fields ( )

log_user_action() public méthode

public log_user_action ( $db, $primary_key )

parse_label() public static méthode

Parse the correct label language. Requires serialized $value.
public static parse_label ( $value ) : string
$value - Serialized
Résultat string NOTE: If your field does not parse properly, check your column length. Set it to TEXT NOT NULL.

quantum_admin_buttons() public méthode

* The Current Stable PHP-Fusion Dynamics Module

quantum_category_form() public méthode

quantum_insert() public méthode

public quantum_insert ( array $data = [] )
$data array

quantum_multilocale_fields() public méthode

Multiple locale fields input
public quantum_multilocale_fields ( $input_name, $title, $input_value, array $options = [] ) : string
$input_name
$title
$input_value
$options array
Résultat string

return_fields_input() public méthode

Return sanitized post values of input fields
public return_fields_input ( $db, $primary_key, $callback_data = FALSE ) : array
$db
$primary_key
Résultat array

serialize_fields() public static méthode

Short serialization function
public static serialize_fields ( $input_name )

setAdminRights() public méthode

if specified, to lock down to certain user rights.
public setAdminRights ( string $admin_rights )
$admin_rights string

setCallbackData() public méthode

$userdata for instance.
public setCallbackData ( array $callback_data )
$callback_data array

setCategoryDb() public méthode

Database Handler for Category Structuring If it does not exist, quantum will automatically build a template onload.
public setCategoryDb ( string $category_db )
$category_db string

setFieldDb() public méthode

Database Handler for Field Structuring If it does not exist, quantum will automatically build a template onload.
public setFieldDb ( string $field_db )
$field_db string

setLocale() public méthode

Set Quantum system locale
public setLocale ( $locale )
$locale

setMethod() public méthode

display renders data
public setMethod ( string $method )
$method string ('input' or 'display')

setPluginFolder() public méthode

If modules are used, specify fields module path API follows Version 7.00's User Fields module.
public setPluginFolder ( string $plugin_folder_path )
$plugin_folder_path string

setPluginLocaleFolder() public méthode

If modules are used, specify fields module locale libs folder path API follows Version 7.00's User Fields Module.
public setPluginLocaleFolder ( $locale_folder_path )
$locale_folder_path

setSystemTitle() public méthode

Give your Quantum based system a name. Will add to breadcrumbs if available.
public setSystemTitle ( string $system_title )
$system_title string

Property Details

$admin_rights protected_oe property

Set the admin rights to Quantum Fields Admin
protected string $admin_rights
Résultat string

$callback_data protected_oe property

feed $userData or $data here to append display_fields() values use the setter function setCallbackData()
protected array $callback_data
Résultat array

$cat_list protected_oe property

maybe can mix with enabled_fields.
protected $cat_list

$category_db protected_oe property

Set the Database to install field structure records Refer to v7.x User Fields Structrue
protected $category_db

$debug protected_oe property

debug mode
protected $debug

$dom_debug protected_oe property

protected $dom_debug

$field_db protected_oe property

protected $field_db

$fields protected_oe property

callback on the structure - use getters
protected $fields

$method protected_oe property

Set as display to show array values output Two methods - input or display
protected string $method
Résultat string

$module_debug protected_oe property

protected $module_debug

$plugin_folder protected_oe property

Set system API folder paths Refer to v7.x User Fields API
protected $plugin_folder

$plugin_locale_folder protected_oe property

protected $plugin_locale_folder

$system_title protected_oe property

Set the Quantum System Fields Page Title
protected $system_title