PHP Класс PHPFusion\QuantumFields

Наследование: extends SqlHandler
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
_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

Описание методов

calculate_byte() публичный Метод

public calculate_byte ( $download_max_b )

displayQuantumAdmin() публичный Метод

* Outputs Quantum Admin Button Sets
public displayQuantumAdmin ( )

display_all_fields() публичный Метод

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

display_fields() публичный Метод

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.
Результат array | boolean | string
  • FALSE on failure
  • string if $method 'display'
  • array if $method is 'input'

fusion_getlocale() публичный статический Метод

public static fusion_getlocale ( $data, $input_name )

getCatList() публичный Метод

public getCatList ( ) : array
Результат array

getFields() публичный Метод

Get results from running load_structure
public getFields ( null $key = NULL ) : array
$key null
Результат array

get_dynamics_type() публичный Метод

public get_dynamics_type ( )

install_quantum() публичный Метод

Quantum Installer for 3rd party applications
public install_quantum ( ) : array
Результат array

is_serialized() публичный статический Метод

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

load_field_cats() публичный Метод

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

load_fields() публичный Метод

public load_fields ( )

log_user_action() публичный Метод

public log_user_action ( $db, $primary_key )

parse_label() публичный статический Метод

Parse the correct label language. Requires serialized $value.
public static parse_label ( $value ) : string
$value - Serialized
Результат string NOTE: If your field does not parse properly, check your column length. Set it to TEXT NOT NULL.

quantum_admin_buttons() публичный Метод

* The Current Stable PHP-Fusion Dynamics Module

quantum_category_form() публичный Метод

quantum_insert() публичный Метод

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

quantum_multilocale_fields() публичный Метод

Multiple locale fields input
public quantum_multilocale_fields ( $input_name, $title, $input_value, array $options = [] ) : string
$input_name
$title
$input_value
$options array
Результат string

return_fields_input() публичный Метод

Return sanitized post values of input fields
public return_fields_input ( $db, $primary_key, $callback_data = FALSE ) : array
$db
$primary_key
Результат array

serialize_fields() публичный статический Метод

Short serialization function
public static serialize_fields ( $input_name )

setAdminRights() публичный Метод

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

setCallbackData() публичный Метод

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

setCategoryDb() публичный Метод

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() публичный Метод

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() публичный Метод

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

setMethod() публичный Метод

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

setPluginFolder() публичный Метод

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() публичный Метод

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() публичный Метод

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

Описание свойств

$admin_rights защищенное свойство

Set the admin rights to Quantum Fields Admin
protected string $admin_rights
Результат string

$callback_data защищенное свойство

feed $userData or $data here to append display_fields() values use the setter function setCallbackData()
protected array $callback_data
Результат array

$cat_list защищенное свойство

maybe can mix with enabled_fields.
protected $cat_list

$category_db защищенное свойство

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

$debug защищенное свойство

debug mode
protected $debug

$dom_debug защищенное свойство

protected $dom_debug

$field_db защищенное свойство

protected $field_db

$fields защищенное свойство

callback on the structure - use getters
protected $fields

$method защищенное свойство

Set as display to show array values output Two methods - input or display
protected string $method
Результат string

$module_debug защищенное свойство

protected $module_debug

$plugin_folder защищенное свойство

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

$plugin_locale_folder защищенное свойство

protected $plugin_locale_folder

$system_title защищенное свойство

Set the Quantum System Fields Page Title
protected $system_title