Property | Type | Description | |
---|---|---|---|
$custom_related_objects | array | Custom Related Objects | |
$field_data | array | Data used during input method (mainly for autocomplete) | |
$group | string | Field Type Group | |
$label | string | Field Type Label | |
$related_data | array | Data used during validate / save to avoid extra queries | |
$related_objects | array | Available Related Objects | |
$type | string | Field Type Identifier |
Property | Type | Description | |
---|---|---|---|
$api | PodsAPI | API caching for fields that need it during validate/save |
Method | Description | |
---|---|---|
__construct ( ) | Setup related objects list | |
admin_ajax_relationship ( ) | Handle autocomplete AJAX | |
admin_init ( ) | Add admin_init actions | |
bidirectional_objects ( ) : array | Return available bidirectional object names | |
data ( string $name, string | array $value = null, array $options = null, array $pod = null, integer $id = null, boolean $in_form = true ) : array | Get the data from the field | |
data_capabilities ( string $name = null, string | array $value = null, array $options = null, array $pod = null, integer $id = null ) : array | Data callback for User Capabilities | |
data_countries ( string $name = null, string | array $value = null, array $options = null, array $pod = null, integer $id = null ) : array | Data callback for Countries | |
data_days_of_week ( string $name = null, string | array $value = null, array $options = null, array $pod = null, integer $id = null ) : array | Data callback for US States | |
data_image_sizes ( string $name = null, string | array $value = null, array $options = null, array $pod = null, integer $id = null ) : array | Data callback for Image Sizes | |
data_months_of_year ( string $name = null, string | array $value = null, array $options = null, array $pod = null, integer $id = null ) : array | Data callback for US States | |
data_post_stati ( string $name = null, string | array $value = null, array $options = null, array $pod = null, integer $id = null ) : array | Data callback for Post Stati | |
data_roles ( string $name = null, string | array $value = null, array $options = null, array $pod = null, integer $id = null ) : array | Data callback for User Roles | |
data_us_states ( string $name = null, string | array $value = null, array $options = null, array $pod = null, integer $id = null ) : array | Data callback for US States | |
delete ( integer $id = null, string $name = null, array $options = null, array $pod = null ) | Delete the value from the DB | |
display ( mixed $value = null, string $name = null, array $options = null, array $pod = null, integer $id = null ) | Change the way the value of the field is displayed with Pods::get | |
get_field_data ( array | string $field, array $options = [], array $object_params = [] ) : array | Get available items from a relationship field | |
get_object_data ( array $object_params = null ) : array | boolean | Get data from relationship objects | |
input ( string $name, mixed $value = null, array $options = null, array $pod = null, integer $id = null ) | Customize output of the form field | |
options ( ) : array | Add options and set defaults to | |
register_related_object ( string $name, string $label, array $options = null ) : array | boolean | Register a related object | |
related_objects ( boolean $force = false ) : array | Return available related objects | |
save ( mixed $value, integer $id = null, string $name = null, array $options = null, array $fields = null, array $pod = null, object $params = null ) | Save the value to the DB | |
schema ( array $options = null ) : array | Define the current field's schema for DB table storage | |
setup_related_objects ( boolean $force = false ) : boolean | Setup related objects | |
simple_objects ( ) : array | Return available simple object names | |
simple_value ( string $name, string | array $value = null, array $options = null, array $pod = null, integer $id = null, boolean $raw = false ) : mixed | Convert a simple value to the correct value | |
ui ( integer $id, mixed $value, string $name = null, array $options = null, array $fields = null, array $pod = null ) | Customize the Pods UI manage table column output | |
validate ( mixed $value, string $name = null, array $options = null, array $fields = null, array $pod = null, integer $id = null, null $params = null ) : array | boolean | Validate a value before it's saved | |
value_to_label ( string $name, string | array $value = null, array $options = null, array $pod = null, integer $id = null ) : string | Get the label from a pick value |
public bidirectional_objects ( ) : array | ||
return | array | Bidirectional object names |
public data ( string $name, string | array $value = null, array $options = null, array $pod = null, integer $id = null, boolean $in_form = true ) : array | ||
$name | string | The name of the field |
$value | string | array | The value of the field |
$options | array | Field options |
$pod | array | Pod data |
$id | integer | Item ID |
$in_form | boolean | |
return | array | Array of possible field data |
public data_capabilities ( string $name = null, string | array $value = null, array $options = null, array $pod = null, integer $id = null ) : array | ||
$name | string | The name of the field |
$value | string | array | The value of the field |
$options | array | Field options |
$pod | array | Pod data |
$id | integer | Item ID |
return | array |
public data_countries ( string $name = null, string | array $value = null, array $options = null, array $pod = null, integer $id = null ) : array | ||
$name | string | The name of the field |
$value | string | array | The value of the field |
$options | array | Field options |
$pod | array | Pod data |
$id | integer | Item ID |
return | array |
public data_days_of_week ( string $name = null, string | array $value = null, array $options = null, array $pod = null, integer $id = null ) : array | ||
$name | string | The name of the field |
$value | string | array | The value of the field |
$options | array | Field options |
$pod | array | Pod data |
$id | integer | Item ID |
return | array |
public data_image_sizes ( string $name = null, string | array $value = null, array $options = null, array $pod = null, integer $id = null ) : array | ||
$name | string | The name of the field |
$value | string | array | The value of the field |
$options | array | Field options |
$pod | array | Pod data |
$id | integer | Item ID |
return | array |
public data_months_of_year ( string $name = null, string | array $value = null, array $options = null, array $pod = null, integer $id = null ) : array | ||
$name | string | The name of the field |
$value | string | array | The value of the field |
$options | array | Field options |
$pod | array | Pod data |
$id | integer | Item ID |
return | array |
public data_post_stati ( string $name = null, string | array $value = null, array $options = null, array $pod = null, integer $id = null ) : array | ||
$name | string | The name of the field |
$value | string | array | The value of the field |
$options | array | Field options |
$pod | array | Pod data |
$id | integer | Item ID |
return | array |
public data_roles ( string $name = null, string | array $value = null, array $options = null, array $pod = null, integer $id = null ) : array | ||
$name | string | The name of the field |
$value | string | array | The value of the field |
$options | array | Field options |
$pod | array | Pod data |
$id | integer | Item ID |
return | array |
public data_us_states ( string $name = null, string | array $value = null, array $options = null, array $pod = null, integer $id = null ) : array | ||
$name | string | The name of the field |
$value | string | array | The value of the field |
$options | array | Field options |
$pod | array | Pod data |
$id | integer | Item ID |
return | array |
public get_field_data ( array | string $field, array $options = [], array $object_params = [] ) : array | ||
$field | array | string | Field array or field name |
$options | array | [optional] Field options array overrides |
$object_params | array | [optional] Additional get_object_data options |
return | array | An array of available items from a relationship field |
public simple_objects ( ) : array | ||
return | array | Simple object names |
public simple_value ( string $name, string | array $value = null, array $options = null, array $pod = null, integer $id = null, boolean $raw = false ) : mixed | ||
$name | string | The name of the field |
$value | string | array | The value of the field |
$options | array | Field options |
$pod | array | Pod data |
$id | integer | Item ID |
$raw | boolean | Whether to return the raw list of keys (true) or convert to key=>value (false) |
return | mixed | Corrected value |
public value_to_label ( string $name, string | array $value = null, array $options = null, array $pod = null, integer $id = null ) : string | ||
$name | string | The name of the field |
$value | string | array | The value of the field |
$options | array | Field options |
$pod | array | Pod data |
$id | integer | Item ID |
return | string |
protected static PodsAPI $api | ||
return | PodsAPI |
public static array $field_data | ||
return | array |