CFIField
in package
Table of Contents
Properties
Methods
- __construct() : mixed
- CFI constructor.
- addExternalAPI() : CFIField
- Set if the field has to be represented as an image
- allowEmpty() : CFIField
- Set if we will create a new row after he field
- apiValues() : CFIField
- Set and external_values field
- autocomplete() : CFIField
- Set if the field to type autocomplete
- boolean() : CFIField
- Set if the field to type boolean
- button() : CFIFieldButton
- Set if the field has to be represented as an image
- cfo() : CFIField
- Set a header before de field for a better structure of the information.
- CFOExternalValues() : CFIField
- Set and external_values field
- checkbox() : CFIField
- Set a checkbox field with values and default value
- cols() : CFIField
- Set how-many cols will be set for the field
- content() : CFIField
- Set if the url for certain types like iframe
- date() : CFIField
- Set a date type
- disabled() : CFIField
- Set if the field to disabled and it will not be sent in the form submit
- ecmHelp() : CFIField
- Set a ecn reference to show a help
- header() : CFIField
- Set a header before de field for a better structure of the information.
- html() : CFIField
- Set if the field to type html
- iframe() : CFIField
- Set if the field to type iframe
- image() : CFIField
- Set if the field has to be represented as an image
- json() : CFIField
- Set if the field to type json
- leftIcon() : CFIField
- prepend_icon to be shown in the field
- link() : CFIField
- Set if the field to type select
- newRow() : CFIField
- Set if we will create a new row after he field
- onchange() : CFIField
- Add onchange property to the field
- onclick() : CFIField
- Add onclick property to the field
- placeHolder() : CFIField
- Set a placeholder for the field
- publicImage() : CFIServerDocuments
- Set if the field to type html
- readOnly() : CFIField
- Set if the field to readonly
- rightIcon() : CFIField
- append_icon to be shown in the field
- select() : CFIField
- Set if the field to type select
- serverDocuments() : CFIServerDocuments
- Set if the field to type html
- tab() : CFIField
- Set a title for the field
- textarea() : CFIField
- Set if the field to type textarea
- title() : CFIField
- Set a title for the field
- url() : CFIField
- Set if the url for certain types like iframe
- value() : CFIField
- Set a value for the field
- virtual() : CFIField
- Set if the field is virtual
- virtualElements() : CFIFieldButton
- Set if the field has to be represented as an image
Properties
$object
public
mixed
$object
$cfi
private
CFI
$cfi
$field
private
mixed
$field
Methods
__construct()
CFI constructor.
public
__construct(CFI &$cfi, string $field) : mixed
Parameters
- $cfi : CFI
- $field : string
addExternalAPI()
Set if the field has to be represented as an image
public
addExternalAPI(mixed $title, mixed $url[, mixed $method = 'POST' ][, mixed $js_condition = null ]) : CFIField
Parameters
- $title : mixed
- $url : mixed
- $method : mixed = 'POST'
- $js_condition : mixed = null
Return values
CFIField —$this
allowEmpty()
Set if we will create a new row after he field
public
allowEmpty([bool $allow_empty = true ]) : CFIField
Parameters
- $allow_empty : bool = true
-
optional params. By default true
Return values
CFIField —$this
apiValues()
Set and external_values field
public
apiValues(string $api[, string $fields = '' ][, int $limit = 10 ][, bool $datastore_search = false ]) : CFIField
Parameters
- $api : string
-
Url to send the query.. 'It normally starts with /cfi/
?fields= - $fields : string = ''
-
Fields to show
- $limit : int = 10
- $datastore_search : bool = false
Return values
CFIField —$this
autocomplete()
Set if the field to type autocomplete
public
autocomplete(array<string|int, mixed> $values[, mixed $defaultvalue = '' ][, mixed $allow_add = false ]) : CFIField
Parameters
- $values : array<string|int, mixed>
- $defaultvalue : mixed = ''
- $allow_add : mixed = false
Return values
CFIField —$this
boolean()
Set if the field to type boolean
public
boolean([string $title = '' ]) : CFIField
Parameters
- $title : string = ''
-
optional title
Return values
CFIField —$this
button()
Set if the field has to be represented as an image
public
button(mixed $title[, mixed $url = '' ][, mixed $method = 'POST' ][, mixed $js_condition = null ]) : CFIFieldButton
Parameters
- $title : mixed
- $url : mixed = ''
- $method : mixed = 'POST'
- $js_condition : mixed = null
Return values
CFIFieldButton —$this
cfo()
Set a header before de field for a better structure of the information.
public
cfo(string $cfo[, mixed $id_field = '' ][, mixed $api = '' ][, mixed $update = false ]) : CFIField
Parameters
- $cfo : string
- $id_field : mixed = ''
- $api : mixed = ''
- $update : mixed = false
Return values
CFIField —$this
CFOExternalValues()
Set and external_values field
public
CFOExternalValues(string $cfo[, string $fields = '' ][, int $limit = 10 ][, bool $_search = false ][, string $id_field = '' ][, array<string|int, mixed> $vars = [] ]) : CFIField
Parameters
- $cfo : string
- $fields : string = ''
-
Fields to show
- $limit : int = 10
- $_search : bool = false
- $id_field : string = ''
- $vars : array<string|int, mixed> = []
Return values
CFIField —$this
checkbox()
Set a checkbox field with values and default value
public
checkbox(array<string|int, mixed> $values[, array<string|int, mixed>|string $value = [] ]) : CFIField
Parameters
- $values : array<string|int, mixed>
-
An array of values for the checkbox
- $value : array<string|int, mixed>|string = []
Return values
CFIField —The CFIField instance
cols()
Set how-many cols will be set for the field
public
cols(float $n_cols) : CFIField
Parameters
- $n_cols : float
-
number of columns to feed: 1,1.5.,2,3
Return values
CFIField —$this
content()
Set if the url for certain types like iframe
public
content( $value) : CFIField
Parameters
Return values
CFIField —$this
date()
Set a date type
public
date([mixed $title = '' ]) : CFIField
Parameters
- $title : mixed = ''
Return values
CFIField —$this
disabled()
Set if the field to disabled and it will not be sent in the form submit
public
disabled([mixed $disabled = true ]) : CFIField
Parameters
- $disabled : mixed = true
Return values
CFIField —$this
ecmHelp()
Set a ecn reference to show a help
public
ecmHelp(string $route[, string $icon = 'question-circle' ]) : CFIField
Parameters
- $route : string
-
id of the ecm page
- $icon : string = 'question-circle'
-
optional to indicate what type of icon to show. default: question-circle
Return values
CFIField —$this
header()
Set a header before de field for a better structure of the information.
public
header(string $title[, string $tag = 'h1' ][, string $class = '_alert-success' ][, string $style = '' ]) : CFIField
Parameters
- $title : string
- $tag : string = 'h1'
- $class : string = '_alert-success'
- $style : string = ''
Return values
CFIField —$this
html()
Set if the field to type html
public
html([string $title = '' ]) : CFIField
Parameters
- $title : string = ''
-
optional title
Return values
CFIField —$this
iframe()
Set if the field to type iframe
public
iframe([ $height = 400 ][, string $url = '' ][, string $content = '' ]) : CFIField
Parameters
- $height : = 400
-
integer optinal iframe height: default 400
- $url : string = ''
- $content : string = ''
Return values
CFIField —$this
image()
Set if the field has to be represented as an image
public
image([bool $image = true ][, int $image_with_pixels = 0 ][, int $image_height_pixels = 0 ]) : CFIField
Parameters
- $image : bool = true
- $image_with_pixels : int = 0
- $image_height_pixels : int = 0
Return values
CFIField —$this
json()
Set if the field to type json
public
json([string $title = '' ]) : CFIField
Parameters
- $title : string = ''
-
optional title
Return values
CFIField —$this
leftIcon()
prepend_icon to be shown in the field
public
leftIcon([string $icon = '' ]) : CFIField
Parameters
- $icon : string = ''
-
icon with fa- prefix. Example: fa-users
Return values
CFIField —$this
link()
Set if the field to type select
public
link([string $url = '' ]) : CFIField
Parameters
- $url : string = ''
Return values
CFIField —$this
newRow()
Set if we will create a new row after he field
public
newRow([bool $new_row = true ]) : CFIField
Parameters
- $new_row : bool = true
-
optional params. By default true
Return values
CFIField —$this
onchange()
Add onchange property to the field
public
onchange(string $js) : CFIField
Parameters
- $js : string
Return values
CFIField —$this
onclick()
Add onclick property to the field
public
onclick(string $js) : CFIField
Parameters
- $js : string
Return values
CFIField —$this
placeHolder()
Set a placeholder for the field
public
placeHolder( $title) : CFIField
Parameters
Return values
CFIField —$this
publicImage()
Set if the field to type html
public
publicImage([string $bucket = '' ][, string $title = '' ]) : CFIServerDocuments
Parameters
- $bucket : string = ''
-
bucket gs://path as base of public files
- $title : string = ''
-
optional folder to add to $folder. It shouldn't starts with '/'
Return values
CFIServerDocuments —$this->object
readOnly()
Set if the field to readonly
public
readOnly([bool $read_only = true ]) : CFIField
Parameters
- $read_only : bool = true
-
optional params. By default true
Return values
CFIField —$this
rightIcon()
append_icon to be shown in the field
public
rightIcon([string $icon = '' ]) : CFIField
Parameters
- $icon : string = ''
-
icon with fa- prefix. Example: fa-users
Return values
CFIField —$this
select()
Set if the field to type select
public
select(array<string|int, mixed> $values[, mixed $defaultvalue = '' ]) : CFIField
Parameters
- $values : array<string|int, mixed>
- $defaultvalue : mixed = ''
Return values
CFIField —$this
serverDocuments()
Set if the field to type html
public
serverDocuments([string $bucket = '' ][, string $folder = '' ]) : CFIServerDocuments
Parameters
- $bucket : string = ''
-
optional bucket path as base of files
- $folder : string = ''
-
optional folder to add to $folder. It shouldn't starts with '/'
Return values
CFIServerDocuments —$this->object
tab()
Set a title for the field
public
tab(int $n_tab) : CFIField
Parameters
- $n_tab : int
-
Number of tab the field has to be shown 0..n
Return values
CFIField —$this
textarea()
Set if the field to type textarea
public
textarea([string $title = '' ]) : CFIField
Parameters
- $title : string = ''
-
optional title
Return values
CFIField —$this
title()
Set a title for the field
public
title( $title) : CFIField
Parameters
Return values
CFIField —$this
url()
Set if the url for certain types like iframe
public
url( $value) : CFIField
Parameters
Return values
CFIField —$this
value()
Set a value for the field
public
value( $value) : CFIField
Parameters
Return values
CFIField —$this
virtual()
Set if the field is virtual
public
virtual([bool $virtual = true ]) : CFIField
Parameters
- $virtual : bool = true
-
optional params. By default true
Return values
CFIField —$this
virtualElements()
Set if the field has to be represented as an image
public
virtualElements([mixed $title = '' ]) : CFIFieldButton
Parameters
- $title : mixed = ''
Return values
CFIFieldButton —$this