TableField
Field schema
Field schema
$Field = $this->get('field', 'order', 'customer');
$Field = $this->get('field', 'order.customer');
First get the Table -object, then Field object:
$Field = $this->get('table', 'order')->getField('customer');
Get Field -object from Field- -object:
$Field = $Order->customer->getTableField();
Method | Return type | Description |
---|---|---|
getId() | int | Unique ID -number. |
getName() | string | Technical name. |
getTitle() | string | Visible name. |
getType() | string | Field type. |
getIconUrl() | string | Fieldtype icon url. |
getDescription() | string | Longer description. |
getHelp() | string | Text that is show for end user in input. |
getDocumentation() | string | Documentation text. |
getPrivilege() | string | Users table privilege. |
getPreferences() | array | Table preferences. |
getPreference('$name/$subname') | mixed | Table preference by given name. |
getTable() | Table | Table field belongs to. |
getTblName() | string | Field name to use in SQL query: tablename.fieldname |
getTblJoinClause([alias,on]) | string | Return SQL join clause: LEFT JOIN fieldTable->targetTable. Alias default: table name. |
isPrivilege(level) | bool | Return TRUE, if user has given privilege to field. |
isEditable() | bool | Return TRUE, if field can be edited by user and user has privilege to it. |
isType(type[,type]) | bool | Return TRUE, if field type is any of given parameter. (fin or eng) |
isFixed() | bool | Return TRUE, if field is fixed (created_at, created_by..) |
isReference() | bool | Return TRUE, if field is a reference to another table. |
getReferenceTable() | Table | Return Table the field refers to. |
Decorators are subclasses that add funcionality to table.
Method | Return type | Description |
---|---|---|
getDecorator(name) | eTableDecorator | Load field decorator object. |