# Function Documentation

## 1. fwp7_param_edit_object

A class that handles the dynamic creation and manipulation of parameter objects with their attributes. This class provides functionality to create typed objects from attributes, manage their properties, and handle data persistence.

### Key Properties:
- `$id_type`: ID of the parameter type
- `$id_obje`: ID of the object instance 
- `$array_attributes`: Formatted array of object attributes with their values
- `$object`: The dynamically created object instance
- `$datas`: Data to be saved/persisted
- `$has_errors`: Flag to track if there were any errors during initialization
- `$error_messages`: Array to store error messages

### Key Methods:
- `__construct($id_type, $id_obje)`: Initializes a new parameter edit object
- `safeGetObjectAttributes($id_type, $id_obje)`: Safely retrieves object attributes with error handling
- `hasErrors()`: Checks if there were any initialization errors
- `getErrorMessages()`: Gets error messages from initialization
- `get_array_attributes()`: Returns the formatted array of attributes
- `get_id_type()`: Returns the parameter type ID
- `get_id_obje()`: Returns the object instance ID
- `get_object()`: Returns the dynamically created object
- `getObject()`: Creates and returns a dynamic object based on the parameter type

## 2. UserTS

A class that serves as an object-oriented wrapper for user-related functions, providing a comprehensive interface to manage user data and associated franchises.

### Key Properties:
- `$userId`: The user identifier
- `$franchises`: Array of franchise objects associated with the user

### Key Methods:
- `__construct(?string $userId = null)`: Initializes with current user ID if none provided
- `getFranchises()`: Returns the array of franchises
- `setFranchises(array $franchises)`: Sets the franchises array
- `fetchFranchises()`: Retrieves franchise objects associated with the user
- `getUserIdentification()`: Gets user identification details
- `getUserId()`: Returns the user ID
- `setUserId(string $userId)`: Sets the user ID
- `getAgendasCredentials()`: Retrieves all CalDAV calendar configurations for the user

## 3. FilterWhereClauseBuilder

A class that builds SQL WHERE clauses from filter inputs. It processes filter form inputs from POST data and generates appropriate SQL WHERE clauses based on filter types and values.

### Key Properties:
- `$post`: POST data containing filter values
- `$idType`: Type identifier for the filters
- `$filters`: Loaded filter configurations
- `$filterIds`: IDs of active filters
- `$whereClauses`: Generated SQL WHERE clauses
- `$filterDescriptions`: Human-readable filter descriptions
- `$textFilter`: Text-based filter content
- `$tablechecked`: Stores rows that have been selected

### Key Methods:
- `__construct($post, $idType)`: Initializes the builder with form data and filter type
- `extractFilterIds()`: Extract filter IDs from POST data keys
- `loadFilters()`: Load filter configurations based on extracted filter IDs
- `processListFilters()`: Process list-type filters from POST data
- `buildWhereClauses()`: Build WHERE clauses for all active filters
- `processTableCheckedItems()`: Process selected table items and create WHERE clause for id_obje values
- `getTextFilter()`: Get the aggregated text filter content
- `processFilter($filterId, $filter)`: Process an individual filter and generate its WHERE clause
- `processArrayFilter($filter, $attnum, $filterValue)`: Process array-type filter values
- `processScalarFilter($filter, $attnum, $filterValue)`: Process scalar (single value) filter values
- `processDateFilter($filter, $attnum, $filterValue)`: Process date filter values in Year-Month-Day format
