Méthode |
Description |
|
__toString ( ) : string |
If field is accidentally converted to string, provide some
descriptive information. |
|
actual ( string $t = UNDEFINED ) : string | $this |
In most cases $model['field'] would match "field" inside a database. In
some cases, however, you would want to use different database field. This
can happen when you join multiple tables and 'field' appears in multiple
tables. |
|
allowHTML ( boolean $t = UNDEFINED ) : boolean | $this |
Configures the behavior of Form to disable tag stripping form user input. |
|
caption ( string $t = UNDEFINED ) : string | $this |
Sets field caption which will be used by forms, grids and other view
elements as a label. The caption will be localized through $app->_(). |
|
defaultValue ( boolean $t = UNDEFINED ) : boolean | $this |
Default Value is used inside forms when you present them without loaded
data. This does not change how model works, which will simply avoid
including unchanged field into insert/update queries. |
|
display ( mixed $t = UNDEFINED ) : mixed | $this |
Normally views will attempt to pick most suitable way to present field. |
|
editable ( boolean $t = UNDEFINED ) : boolean | $this |
Set editable to false, if you want to exclude field from forms
or other means of editing data. This does not affect the actual model
values. |
|
emptyText ( string $t = UNDEFINED ) : string | $this |
What to display when nothing is selected or entered? This will be
displayed on a drop-down when no value is selected: ("Choose . |
|
enum ( array $t ) : array |
Similar to listData() but accepts array of values instead of hash:. |
|
get ( ) : mixed |
Get the value of the field of a loaded model. If model is not loaded
will return default value instead. |
|
getBooleanValue ( mixed $value ) : integer | null |
Converts true/false into boolean representation according to the "enum" |
|
getModel ( ) : string |
Returns current model. This is different than other setters getters,
but it's done to keep consistency with the rest of Agile Toolkit. |
|
group ( string $t = UNDEFINED ) : string | $this |
While you may use visible(), editable() to include or exclude fields
from appearing in certain scenarios, you can also define a group which
you then can display instead of listing all fields manually inside
setModel(). Read more about Actual Fields. |
|
hidden ( boolean $t = UNDEFINED ) : boolean | $this |
Hide field. Not sure! |
|
hint ( string $t = UNDEFINED ) : string | $this |
Sets field hint which will be used by forms. |
|
length ( integer $t = UNDEFINED ) : integer | $this |
This will provide a HTML settings on a field for maximum field size. |
|
listData ( array $t = UNDEFINED ) : array | $this |
Supplies a list data for multi-value fields (selects, radio buttons,
checkbox area, autocomplete). You may also use enum(). This setting
is typically used with a static falues (Male / Female), if your field
values could be described through a different model, use setModel()
or better yet - hasOne(). |
|
mandatory ( boolean $t = UNDEFINED ) : boolean | $this |
Asterisk will be displayed by the form (if field is include in "actual"
fields. This property will not affect the direct use of the field inside
model. If you would like that your model complains about empty fields,
you should edit beforeSave hook. |
|
onField ( callback $c = UNDEFINED ) : string | $this |
Pass a callback to onField() which is executed with the argument
containing a field view, when model is associated with a form. |
|
placeholder ( string $t = UNDEFINED ) : string | $this |
Sets field placeholder (gray text inside input when it's empty). |
|
readonly ( boolean $t = UNDEFINED ) : boolean | $this |
Read only setting will affect the way how field is presented by views. |
|
required ( boolean $t = UNDEFINED ) : boolean | $this |
|
|
sanitize ( mixed $value ) : mixed |
This is used in Controller_Data_SQL to sanitize the value forwarded to dsql. |
|
searchable ( boolean $t = UNDEFINED ) : boolean | $this |
Setting searchable(true) will instruct Filter and similar views that
it should be possible to perform search by this field. |
|
set ( mixed $value = null ) : Field |
Sets the value of the field. Identical to $model[$fieldname]=$value. |
|
setModel ( string $t = UNDEFINED ) : string | $this |
Will execute setModel() on a field. Some fields will change their
behaviour with this. The value is a string (either Model_Book or Book)
but you might be able to use object also. |
|
setValueList ( array $t ) : array |
Same as listData(). |
|
setterGetter ( string $type, mixed $value = UNDEFINED ) : mixed | $this |
Implementation of generic setter-getter method which supports "UNDEFINED"
constant. This method is used by all other sette-getters. |
|
sortable ( boolean $t = UNDEFINED ) : boolean | $this |
Will instruct Grid and similar views that the sorting controls must be
enabled for this field. |
|
system ( boolean $t = UNDEFINED ) : boolean | $this |
Marking field as system will cause it to always be loaded, even if
it's not requested through Actual Fields. It will also hide the field
making it dissapear from Grids and Forms. A good examples of system
fields are "id" or "created_dts". |
|
table ( string $t = UNDEFINED ) : string | $this |
If is set, it contains the correct table that stores this field. |
|
type ( string $t = UNDEFINED ) : string | $this |
Logical type of model field. This universal type is recognized by
view controllers (such as Controller_MVCForm, Controller_MVCGrid to
convert into supported field types. |
|
visible ( boolean $t = UNDEFINED ) : boolean | $this |
Controls field appearance in Grid or similar views. |
|