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
- cfo() : CFIField
- Set a header before de field for a better structure of the information.
- 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
- 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
- link() : CFIField
- Set if the field to type select
- newRow() : CFIField
- Set if we will create a new row after he field
- readOnly() : CFIField
- Set if the field to readonly
- select() : CFIField
- Set if the field to type select
- 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
Properties
$cfi
private
mixed
$cfi
$field
private
mixed
$field
Methods
__construct()
CFI constructor.
public
__construct(CFI &$cfi, mixed $field) : mixed
Parameters
- $cfi : CFI
- $field : mixed
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) : CFIField
Parameters
- $api : string
-
Url to send the query.. 'It normally starts with /cfi/
?fields= - $fields : string
-
Fields to show
Return values
CFIField —$this
autocomplete()
Set if the field to type autocomplete
public
autocomplete(array<string|int, mixed> $values[, mixed $defaultvalue = '' ]) : CFIField
Parameters
- $values : array<string|int, mixed>
- $defaultvalue : mixed = ''
Return values
CFIField —$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
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
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 ][, mixed $url = '' ]) : CFIField
Parameters
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
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
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
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
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