PodsForm::tableless_field_types PHP Method

tableless_field_types() public static method

Get list of available tableless field types
Since: 2.3
public static tableless_field_types ( ) : array
return array Tableless field types
    public static function tableless_field_types()
    {
        static $field_types = null;
        if (null === $field_types) {
            $field_types = array('pick', 'file', 'avatar', 'taxonomy');
            $field_types = apply_filters('pods_tableless_field_types', $field_types);
        }
        return $field_types;
    }

Usage Example

    }
    if (!empty(PodsForm::$field_group)) {
        if (!isset($field_types_select[PodsForm::$field_group])) {
            $field_types_select[PodsForm::$field_group] = array();
        }
        $field_types_select[PodsForm::$field_group][$type] = $field_type_data['label'];
    } else {
        if (!isset($field_types_select[__('Other', 'pods')])) {
            $field_types_select[__('Other', 'pods')] = array();
        }
        $field_types_select[__('Other', 'pods')][$type] = $field_type_data['label'];
    }
}
$field_defaults = array('name' => 'new_field', 'label' => 'New Field', 'description' => '', 'type' => 'text', 'pick_object' => '', 'sister_id' => '', 'required' => 0, 'unique' => 0);
$pick_object = PodsForm::field_method('pick', 'related_objects', true);
$tableless_field_types = PodsForm::tableless_field_types();
$simple_tableless_objects = PodsForm::field_method('pick', 'simple_objects');
$bidirectional_objects = PodsForm::field_method('pick', 'bidirectional_objects');
foreach ($pod['options'] as $_option => $_value) {
    $pod[$_option] = $_value;
}
foreach ($pod['fields'] as $_field => $_data) {
    $_data['options'] = (array) $_data['options'];
    foreach ($_data['options'] as $_option => $_value) {
        $pod['fields'][$_field][$_option] = $_value;
    }
}
$field_defaults = apply_filters('pods_field_defaults', apply_filters('pods_field_defaults_' . $pod['name'], $field_defaults, $pod));
$pick_table = pods_transient_get('pods_tables');
if (empty($pick_table)) {
    $pick_table = array('' => __('-- Select Table --', 'pods'));
All Usage Examples Of PodsForm::tableless_field_types