App\Core_CustomField

Inherited from cmsApplication_CategorizedList

Protected Attributes

protected $field_type_categories= []
protected $field_type_items= []
protected $field_with_choices= []

Public Methods

public __construct()
public getFieldTypeCategories()
public getFieldTypeItems($category)
public intgetDefaultCategoryID()
Returns the default category ID
public array @global \SCHLIX\cmsDatabase $SystemDBgetCategoryIDByTableName($table_name)
Returns an array containing on array of main page options. The values of the options will still be evaluated as a flat list array, however it is sectioned into array with the following keys: header, value, type, and options. Label: section title (not used for any evaluation Type: checkboxgroup, dropdownlist, or none. If none, then it means there are suboptions which contain another array of this Key: the key option. Please note that checkboxgroup doesn't have a key since the keys are in the options Options: an array with 2 keys: label and key Label: section title (not used for any evaluation Type: checkboxgroup, dropdownlist, or none. If none, then it means there are suboptions which contain another array of this Key: the key option. Please note that checkboxgroup doesn't have a key since the keys are in the options Options: an array with 2 keys: label and key int int
public arraygetCustomFields(string $table_name)
Returns a list of custom fields @global \SCHLIX\cmsDatabase $SystemDB
public arraygetCustomFieldsByTableID($table_id)
Returns a list of custom fields @global \SCHLIX\cmsDatabase $SystemDB
public arraygetCustomFieldByName($field_name)
Returns a list of custom fields @global \SCHLIX\cmsDatabase $SystemDB
public intgetAndCreateCategoryByTableHash($table_name)
@global \SCHLIX\cmsDatabase $SystemDB
public delete(string $mixed_items_to_delete)
Deletes items from table. The parameter $mixed_items_to_delete is a pipe-separated value of items, e.g. i4|i5|i1 @global \SCHLIX\cmsDatabase $SystemDB
public getRequiredFieldInfo($field_type)
public getFieldTypeString($field_type, $field_length, $field_precision_length, $field_unsigned, $field_default_null=true, $field_default_value=null)
public arraymodifyDataValuesBeforeSaveItem(array $datavalues)
Override - modify data values before save item
public ensureCustomFields($table_name, $old_field_name, $field_name, $field_type, $field_length, $field_precision_length, $field_unsigned, $field_default_null, $field_default_value)
public bool|array String arraygetValidationErrorListBeforeSaveItem(array $datavalues)
Validates save item. If there's an error, it will return an array with one or more error string, otherwise it will return a boolean true @global \App\Users $CurrentUser
public boolRun(array $command)
Run command passed by the main router

Public Static Methods

public static getCustomFieldFromTable($table_name)
public static getCustomFieldPOSTData($table_name)
public static displayAllCustomFieldFormInput($table_name, $is_admin=false)
public static drawCustomFieldFormInput($cf, $is_admin=false)