class ListProperties extends DocumentModel implements SearchableDocumentInterface, DoclinkableDocumentInterface, ActionlogActivityDocumentInterface mixin ListDocumentation

Class XELOS\Modules\Lists\Model\ListProperties

Traits

Trait Auditable to be used in Models

Constants

EVENT_MODEL_AFTER_SAVE

EVENT_MODEL_BEFORE_SAVE

EVENT_MODEL_BEFORE_DELETE

EVENT_MODEL_AFTER_DELETE

FIELD_IS_NULL

$this->find_by_field(Model::IS_NULL)

ACTIVE_OPEN

ACTIVE_CLOSED

DEACTIVATED

Properties

ListsController $mod
protected string|null $model_name from  Model
protected $table_name
protected $table_use_group_id
protected $table_auto_properties
protected string $table_primary_key from  Model
protected array $table_primary_compound_key from  Model
protected $properties
protected array $properties_meta from  Model
protected array $markers from  Model
bool|string $class_name from  Model
string $render_type from  Model
$model_version
protected $model_default_render_xui
protected array $render_params

Parameters that will be consigned to the XUI helper

from  Model
static string $find_by_separators from  Model
bool $loaded from  Model
bool $saved from  Model
protected array $changed from  Model
array $cache_function_result from  Model
static array $_request_cache from  Model
static protected bool $auditingDisabled

Is auditing disabled?

from  AuditableTrait
protected $auditExcludedProperties from  AuditableTrait
static bool $silent_mode from  DocumentModel
protected array $_update_document_index from  DocumentModel
protected DocumentIndex|null $documentIndex from  DocumentModel
DocumentIndexReference $rights_context

A document that can be used for accessing this document. Their must either be a reference between the rights_context and the document or the can_read of the document must actually evalute the rights context.

from  DocumentModel
int $id ID
int $user_id

User ID

int $group_id

Group ID

int $as_template

Is a template?

int $category_id

Category ID

int $active Active
string $title Title
string $list_type

standard, workflow, template

string $form_identifier Identifier
string $form_type

Type [standalone|workflow]

string $form_description Description
string $form_struct

Structure JSON encoded array of form fields

string $resources

Structure JSON encoded array of resource fields

$form_link

Form link for redirecting after form submits

string $form_process

Processor [workflows]

string $process_email_subject

Subject of form email

string $process_email_recipients

Recipients of form email

string $process_db_storage_sql

Database storage SQL

int $process_workflow_id

Workflow ID

int $show_workflow_status

Shows the workflow status instead of the list status

int $item_count

Total items created for this list

string $timespan_label

The field name of the label used for the calendar hook.

string $timespan_location

The field name of the location used for the calendar hook.

string $timespan_user

The field name of the user used for the calendar hook.

int $created_at

Create date

int $updated_at

Last update date

string $rights_check

enum: hidden|read_assigned|read_all|edit_assigned|edit_all

Methods

__call(string $method, array $args = array())

No description

from  Model
__clone()

Magic Function Object Cloning Make sure object references are cleaned up as each object requires a clean and separate reference

from  Model
__construct(int|bool $id = false)

No description

mixed
__get(mixed $var)

No description

from  Model
__isset($name)

No description

from  Model
__set(mixed $var, mixed $value)

No description

from  Model
string
__toString()

String Representation of this object (calls for render method)

mixed
_call_cached_function(string $function, array $args)

Calls the passed function only if it is not cached yet, otherwise the previous cached result will be returned

from  Model
_scopeAll(Query $Query)

Global named scope scopeAll to use on models to return an unscoped unloaded collection

_scopeDefault(Query $Query)

Load default scopes

_scopeGroupId(Query $Query)

Applies Group ID Filtering

from  Model
_scope_by(string $fn, array $parameters)

Called for scopeby Magic Function Creates a new ModelCollection and applies the passed scope

_scope_custom(string $scopeName, Query|null $Query = null)

Called for scope_ Magic Function Creates a new ModelCollection and applies the passed custom scope function

AuditTrail|null
addAuditTrail(string $event = AuditableInterface::AUDIT_EVENT_MISC, string|null $customMessage = null)

No description

add_formatted_property(string $property, string $format, array $options = array())

Apply lib->format multi_format on passed property. The result will be written to ->[property]_formatted

from  Model
add_scope_condition(Condition|ConditionGroup|Query|string $new_condition)

Adds a condition to scope the following find functions

ListProperties[]
all(mixed $query_params)

No description

bool
canAddEntries(string|null $viewMode = null)

Check, whether a user is able to add entries to an existing list by checking several cases.

bool
can_manage()

Can manage this list (can create and configure lists)

bool
can_moderate()

Can moderate this list (can ALWAYS see ALL items)

bool
can_read()

Can read: User can read list

bool
can_read_comments()

Returns whether this model should allow related comments or not. The user can still be denied comments when the comments policy "write" is not given to the user.

bool
can_read_comments_global(bool $return_hidden = false)

Checks whether this model can be commented on.

bool
can_read_global($return_hidden = false)

This function checks wether this document can be read by the logged in user and takes the full hierarchy (parent instances) and all possible rights contexts into account

bool
can_read_global_in_rights_context(DocumentIndexReference|false $rights_context = false)

Evaluates can_read_global inside a specific rights context

bool
can_reference()

Checks whether this document can be linked with read reference.

bool
can_see()

Can see defaults to can_read_global, but can be overridden by supporting modules (e.g. closed group should be visible but not readable)

bool
can_share() deprecated

Returns true if this document can be shared with groups or users.

bool
can_write()

Can write/edit items of this list

bool
can_write_comments()

Returns whether this model should allow to create comments or not. The user can still be denied to write comments when the comments policy "write" is not given to the user.

bool
can_write_global($return_hidden = false)

This function checks wether this document can be read by the logged in user and takes the full hierarchy (parent instances) and all possible rights contexts into account

bool
can_write_global_in_rights_context(DocumentIndexReference $rights_context)

Evaluates can_write_global inside a specific rights context

clear_cached_functions(string|bool $function = false)

Clears the cache for all functions or a specific one

from  Model
clear_properties()

No description

from  Model
bool
copyToTarget(ListProperties $listProperties = null, bool $with_items = false)

Creates a copy of the list and related list statuses

int
count_all() $eturns the count of all models, see $this->find('count')

No description

from  Model
int
count_by_TABLE_COL_and_TABLE_COL2(mixed $COL1_VALUE, mixed $COL2_VALUE)

Returns the count of all models with the specific column value

from  Model
string|void
debug(bool $show_markers = false, int $mode = 0)

No description

from  Model
bool
delete()

Delete List and all contained items

int
delete_by_TABLE_COL(mixed $COL_VALUE) Delete rows specified by condition and returns the affected rows. NOTE: This does not trigger a delete() function of the model. If required use pluck('delete')

on the desired collection.

from  Model
void
disable_silent_mode()

Disables the silent mode Objects in silent mode do not cause document index job queues, thus saving them is much more performant but does not update the search index, the wall or other similar system modules

void
disable_table_group_id()

Disable the use of the group ID in all queries made

from  Model
void
enable_silent_mode()

Sets the silent mode to true Objects in silent mode do not cause document index job queues, thus saving them is much more performant but does not update the search index, the wall or other similar system modules

void
enable_table_group_id()

Enable the use of the group ID in all queries made

from  Model
static DocumentModel|null
fetchByUuid(string $uuid, bool $ignoreCanReadRights = false) deprecated

Get Document by using the uuid

find(string $mode = 'all', Condition|ConditionGroup|Query|string|array $conditions = false, array|null $query_params = null)

Find Function to find models using the passed condition

from  Model
ModelCollection|Model[]
find_all_by_TABLE_COL_and_TABLE_COL2($COL1_VALUE, $COL2_VALUE, $params=['order_by'=>'COL1, 5]] $)

Returns loaded ModelCollection

from  Model
ListProperties[]
find_all_by_active(string|array $active, mixed $sql_params)

No description

ListProperties[]
find_all_by_category_id(int|int[] $category_id, mixed $sql_params)

No description

ListProperties[]
find_all_by_category_id_and_active(int|int[] $selectedCategoryID, string|array $active, array $params = [])

No description

ListProperties[]
find_all_by_category_id_and_active_and_title(mixed $categories, string|array $active, array $array, array $array1)

No description

ListProperties[]
find_all_by_form_identifier(string|string[] $identifier, mixed $sql_params)

No description

ListProperties[]
find_all_by_id(mixed $id, mixed $sql_params)

No description

find_by_TABLE_COL(mixed $COL_VALUE, mixed $params = ['order_by'=>'COL1)

Returns all models with a specific column value. Query params can be e.g. order_by

from  Model
find_by_form_identifier(string $identifier, mixed $sql_params)

No description

find_by_id(mixed $id, mixed $sql_params)

No description

functionNameToQuery(string $query, array $parameters)

Converts a findby* function name to SQL query.

from  Model
getAccessibleItems(FacetedFilter|null $faceted = null, string|null $viewMode = 'user', string|null $order_field = "friendly_id", string|null $order_by = "ASC", int|null $start = null, int|null $limit = null)

Get all accessible items for current user as unloaded collection

array
getAuditEvents()

Get audit events

array
getAuditExcludeProperties()

Get the (Auditable) properties excluded from audit.

array
getAuditIncludeProperties()

Get the auditable properties to include in audit Defaults to all attributes in the DB Schema

getAuditTrail(int $limit = 50)

Get the last auditTrail records for current Model

ModelCollection|null
getAvailableWorkflowStatuses()

Returns a scoped model collection of workflow statuses that belong to this list (process_workflow_id).

array
getChangedProperties(bool $returnOldValues = false)

Return properties which have been changed after model was initialized/loaded We know these values have been changed locally, but these changes are NOT necessarily reflecting the DB diff

from  Model
getCollectionByQuery(string $model_name, array|string $dbquery_result, string $population_mode = 'full', string $post_fill_function = 'update')

No description

from  Model
array
getDBSchema(string $field = null)

Get DB Schema if available

from  Model
array
getFieldsByType($fieldType)

Return FDL for fields of specified type

string[]
getI18nPropertyVariants($propertyName, $localeAsKey = false)

Returns a list of all property name variants for all languages, e.g. "title_i18n" -> "title_i18n, title_DE_DE, title_EN_EN"

from  Model
getI18nTokenForProperty(string $i18nProperty, int|null $limitString = null)

Gets an I18nToken for a model property (e.g. title_i18n)

from  Model
getMod()

No description

array
getOrderFieldBy(string $order_field = null, string $order_by = 'ASC')

Function will return an order field to be used in SQL or Collection sorting

getPresets(bool $activeOnly = true)

No description

int|null
getPrimaryKeyValue()

Get the primary id (post_id) for this model

from  Model
array
getPropertyMarkers(bool $value_discovery = true)

Return properties and markers

from  Model
getScopeQuery(bool $applyDefaultScopes = true)

Returns the Query object which is being used for building the query The function creates a new Query object if required to enable lazy loading

array
getSecondarySortableFields(string $order_field, int $secondarySortFieldCount = 2)

No description

array
getSortableFields(bool $includeFilterableFields = false)

Returns all the sortable fields of a list, which might be the first 3.

array
getTouchedProperties(bool $returnOldValues = false)

Return properties which have been touched/set after model was initialized/loaded We know these values have been set, but they might not have changed

from  Model
getUniqueField()

No description

get_category()

Access the list category.

get_cf()

Return the cf library for this model type

string
get_created_at_formatted()

Return a Formatted DateTime

from  Model
array
get_db_properties()

Returns all properties which are available as DB field (= can be used as find_by() properties) with its currently known raw value Please note that smartTimeFields (updated_at, created_at) are not converted to mysql-date format

from  Model
get_default_status()

No description

DocumentIndex|null
get_document_index()

Returns the related document index.

DocumentRegistry|null
get_document_registry_info()

Return the information from the document registry This information contains additional meta data as well as relational information

get_document_tmp_folder()

Returns the path for this documents storage path This folder is automatically cleared when the document is removed

array
get_facetted_fields(bool $ignore_limit = false, bool $return_status = false)

Returns the form field IDs for the facetted filter fields facetted_1 - facetted_5 in the list item, but not the list status, because it is saved in a separate row.

array
get_facetted_values(string $id)

Returns all distinct values of a facetted field.

array
get_form_fdl(string $show_only = 'all')

Return the current form in FDL array format

bool|mixed
get_i18n_property(string $property, string $force_language = false)

Return the property translated property value if available

from  Model
string|null
get_model_name()

Returns the SQL table of this model (if available)

from  Model
string|bool
get_model_table_name(string $table_name = null)

Returns the SQL table of this model (if available)

from  Model
array
get_properties(bool $value_discovery = true)

Returns the complete properties array

from  Model
array
get_properties_meta(?string $field = null)

No description

from  Model
mixed
get_property(string|null $property_id, bool $get_raw_value = false)

No description

from  Model
static mixed|null
get_request_cache(string $key)

Return Cache Entry if it exists

from  Model
bool
get_silent_mode()

Returns if the silent mode is currently active Objects in silent mode do not cause document index job queues, thus saving them is much more performant but does not update the search index, the wall or other similar system modules

array
get_status_pop_data()

No description

string|null
get_table_name()

Returns the table name of this model.

from  Model
string|null
get_table_primary_key()

No description

from  Model
string
get_updated_at_formatted()

Return a Formatted DateTime

from  Model
Document|null
get_xui_document()

Get XUI Document Representation

void
handle_reference_delete(DocumentIndexReference $reference, int $event_user_id = null)

Function is called in routine as part of the index event 'delete' Be aware that the original referenced document will not exist at time of calling This event/callback gives the opportunity to clean up the existing reference (e.g. you are referencing to this document and it you need to act upond this element being deleted)

bool
hasChangedProperties()

No description

from  Model
bool
hasExistingDatabaseRecord()

Does this model represent an existing database record? (can be updated)

from  Model
bool
hasField(string $fieldType)

Has this list a field of a certain type?

bool
hasPresets(bool $activeOnly = true)

No description

bool
hasTouchedProperties()

Returns true if at least one property is marked as changed

from  Model
init(bool $auto_load = true)

Initializes the model

from  Model
initAuditableTrait()

Init Method

bool
isActive()

No description

bool
isActiveAndClosed()

No description

bool
isActiveAndOpen()

No description

bool
isAuditingEnabled()

Determine whether auditing is enabled.

bool
isWorkflowList(bool $showStatusCondition = false)

Check, whether this list is a list whose items should be processed via workflows.

load()

No description

from  Model
bool
load_from_db(string $table_name = null, array $key_fields = [])

No description

from  Model
localReIndex()

Reindex local items to save items

void
onRestore()

Automatically recover document index if document model is restored

onSearchIndexUpdate(SearchIndexRecord $baseIndexRecord)

No description

static array
parseIdRefProperty(mixed $documentIndexValues = null)

Function to parse a property which is supposed to contain id references

populate_model_by_query(string $model_name, array|string $dbquery_result, string $population_mode = 'full', string $post_fill_function = 'update') deprecated

No description

from  Model
void
registerDefaultScope($scopeName)

Registers the passed scope as default scope A default scope is present when the model is being loaded and can be removed using the unscope() function if required The passed scope must be defined in a scope[SCOPE_NAME] function e.g. scopeGroupId

reload_schema()

Reloads the schema of the model

from  Model
remove_document_index()

removes index-entry of this model (only marking to delete).

bool
remove_from_db(string $table_name, array $key_fields = null)

No description

string|null
render()

Generic Renderer

static void
resetRightsCache(int $document_index_id)

No description

void
resetScopeQuery()

Reset Scope to null

DocumentIndexReference|null
resolve_rights_context(null|string $right = null, bool $apply = false)

Loads the rights context by checking all possible rights context and return it without apply on this model.

bool
runsWorkflowProcesses()

Is this list a workflow list and are there workflow items running, that depend on this list?

int|bool
save()

No description

int|bool
save_to_db(string $table_name, array $params = array())

No description

from  Model
bool|array
schema_values(mixed $field_name)

Provides a list of all values allowed for enumerations.

from  Model
scope(string $scopeName, Query|null $scopeQuery = null)

No description

scopeAll()

No description

Model[]
scope_by_TABLE_COL_and_TABLE_COL2(mixed $COL1_VALUE, mixed $COL2_VALUE)

Returns unloaded ModelCollection

from  Model
scope_by_id(int|array $id)

No description

void
self() $this find_by_id($id)

No description

from  Model
setDocumentIndex(DocumentIndex|null $documentIndex)

Sets the related document index.

void
setModelCollectionReference(ModelCollection $modelCollectionReference)

No description

set_default_status(ListStatus $default_status) deprecated

No description

void
set_properties_from_array(array $input, array|bool $filter = false)

No description

from  Model
set_property(string|array $property_id, mixed $property_value = false, bool $no_change = false)

Set a Property. If $property_id is an array and $property_value is false, set_property is called for each element in the array with the array key and value as params.

from  Model
set_render_params(mixed $params = array())

Sets parameter that will be passed to the XUI helpers

from  Model
static 
set_request_cache(string $key, mixed $value)

Set Request Cache Entry

from  Model
set_status_pop_data(array $statuses) deprecated

The status pop data can be set to prevent an additional call to the database to access the statuses multiple times.

void
sortMoveTo(int $id, int $sortTo, array|null $conditions = [])

Sort this element to a specific position

sort_down(int $steps = 1, $params = array())

Decrease Sort Priority (Increases SORT value)

sort_up(int $steps = 1, $params = array())

Increase Sort Priority (Decreases SORT value)

stop_temporary_group_id_overwrite()

Stops the temporary overwrite of the table_group_id

from  Model
void
temporarily_disable_table_group_id()

Temporarily disable the use of the group ID in all queries made

from  Model
string
to_json()

Returns the model as JSON array

from  Model
string
to_string()

Returns the model as STRING

from  Model
string
to_xml(array|bool $property_filter = false, bool|DOMDocument $doc = false, DOMElement $parent_element = null)

Returns an XML of all model properties

from  Model
void
touchProperty($propertyName)

No description

from  Model
triggerAuditEvent(Model $model, string $eventKey = AuditableInterface::OBSERVE_EVENT_SAVE)

TBD: Move this method to the audit model? and keep things slim in trait?

unscope(string $scopeName = null, Query|null $scopeQuery = null)

Returns an unscoped Collection

bool
update_document_index(string $status = IndexEventInterface::EVENT_UPDATE)

updates the related index-item for itself (not global, only for this model!)

int
update_sort(mixed $id = false, string $direction = 'up', int $steps = 1, array $params = array())

Update the sort property for a given table (Move a record up/down)

string|true
validate(array $fieldErrors)

Tests if the form_identifier is unique and if only 5 facetted fields are selected.

Details

in Model at line 1117
ModelCollection|Model|Model[]|int __call(string $method, array $args = array())

No description

Parameters

string $method method-name
array $args params

Return Value

ModelCollection|Model|Model[]|int
  • Returns resource (find...) or affected rows (count..|deleted..)

in Model at line 1684
__clone()

Magic Function Object Cloning Make sure object references are cleaned up as each object requires a clean and separate reference

at line 117
__construct(int|bool $id = false)

No description

Parameters

int|bool $id

Primary ID of the model which should be loaded

in Model at line 1093
mixed __get(mixed $var)

No description

Parameters

mixed $var

Return Value

mixed

in Model at line 1743
__isset($name)

No description

Parameters

$name

in Model at line 1105
Model __set(mixed $var, mixed $value)

No description

Parameters

mixed $var
mixed $value

Return Value

Model

at line 103
string __toString()

String Representation of this object (calls for render method)

Return Value

string

in Model at line 1155
mixed _call_cached_function(string $function, array $args)

Calls the passed function only if it is not cached yet, otherwise the previous cached result will be returned

Parameters

string $function method-name
array $args params

Return Value

mixed

in ScopesTrait at line 100
Query _scopeAll(Query $Query)

Global named scope scopeAll to use on models to return an unscoped unloaded collection

Parameters

Query $Query Query

Return Value

Query

in ScopesTrait at line 111
Query _scopeDefault(Query $Query)

Load default scopes

Parameters

Query $Query

Return Value

Query

in Model at line 1631
protected Query _scopeGroupId(Query $Query)

Applies Group ID Filtering

Parameters

Query $Query

Return Value

Query

in ScopesTrait at line 143
protected ModelCollection _scope_by(string $fn, array $parameters)

Called for scopeby Magic Function Creates a new ModelCollection and applies the passed scope

Parameters

string $fn
array $parameters

Return Value

ModelCollection

in ScopesTrait at line 159
protected ModelCollection _scope_custom(string $scopeName, Query|null $Query = null)

Called for scope_ Magic Function Creates a new ModelCollection and applies the passed custom scope function

Parameters

string $scopeName

Name of the custom scope - e.g. Active - calls _scopeActive() on the model

Query|null $Query

Return Value

ModelCollection

in AuditableTrait at line 97
AuditTrail|null addAuditTrail(string $event = AuditableInterface::AUDIT_EVENT_MISC, string|null $customMessage = null)

No description

Parameters

string $event
string|null $customMessage

Return Value

AuditTrail|null

Exceptions

AuditException

See also

AuditableInterface::addAuditTrail

in Model at line 954
add_formatted_property(string $property, string $format, array $options = array())

Apply lib->format multi_format on passed property. The result will be written to ->[property]_formatted

Parameters

string $property

Property of models to format

string $format

Format Type (e.g. money, date, ...)

array $options

Additional format options

in ScopesTrait at line 34
ModelCollection add_scope_condition(Condition|ConditionGroup|Query|string $new_condition)

Adds a condition to scope the following find functions

Parameters

Condition|ConditionGroup|Query|string $new_condition

Return Value

ModelCollection

at line 83
ListProperties[] all(mixed $query_params)

No description

Parameters

mixed $query_params

Return Value

ListProperties[]

at line 239
bool canAddEntries(string|null $viewMode = null)

Check, whether a user is able to add entries to an existing list by checking several cases.

One of this case might include the view mode, the user is currently operating in.

Parameters

string|null $viewMode

The user's current view mode. Either 'user', 'admin' or null (for item creation through portlets, which don't have a certain view).

Return Value

bool

at line 218
bool can_manage()

Can manage this list (can create and configure lists)

Return Value

bool

at line 198
bool can_moderate()

Can moderate this list (can ALWAYS see ALL items)

Moderate is almost identical to manage and will primarily differ when user has no rights to listEditorPage, i.e. user cannot configure/change the list

Return Value

bool

at line 139
bool can_read()

Can read: User can read list

Return Value

bool

in DocumentModel at line 429
bool can_read_comments()

Returns whether this model should allow related comments or not. The user can still be denied comments when the comments policy "write" is not given to the user.

Return Value

bool

TRUE if this model can be commented, false if not.

in DocumentModel at line 451
final bool can_read_comments_global(bool $return_hidden = false)

Checks whether this model can be commented on.

Parameters

bool $return_hidden

Return Value

bool

See also

can_read_comments

in DocumentModel at line 361
final bool can_read_global($return_hidden = false)

This function checks wether this document can be read by the logged in user and takes the full hierarchy (parent instances) and all possible rights contexts into account

Parameters

$return_hidden

bool Flags if hidden elements may be returned or not

Return Value

bool

in DocumentModel at line 413
bool can_read_global_in_rights_context(DocumentIndexReference|false $rights_context = false)

Evaluates can_read_global inside a specific rights context

Parameters

DocumentIndexReference|false $rights_context

The rights context for which to check the access rights

Return Value

bool

in DocumentModel at line 795
bool can_reference()

Checks whether this document can be linked with read reference.

This method also considers the group context and parent context of the mod owns this document to apply module specific reference policies.

Return Value

bool

in DocumentModel at line 770
bool can_see()

Can see defaults to can_read_global, but can be overridden by supporting modules (e.g. closed group should be visible but not readable)

Return Value

bool

in DocumentModel at line 498
bool can_share() deprecated

deprecated unused

Returns true if this document can be shared with groups or users.

This method can be overridden by subclass.

Return Value

bool

at line 169
bool can_write()

Can write/edit items of this list

Return Value

bool

in DocumentModel at line 439
bool can_write_comments()

Returns whether this model should allow to create comments or not. The user can still be denied to write comments when the comments policy "write" is not given to the user.

Return Value

bool

TRUE if new comments can be created.

in DocumentModel at line 508
final bool can_write_global($return_hidden = false)

This function checks wether this document can be read by the logged in user and takes the full hierarchy (parent instances) and all possible rights contexts into account

Parameters

$return_hidden

bool Flags if hidden elements may be returned or not

Return Value

bool

in DocumentModel at line 546
bool can_write_global_in_rights_context(DocumentIndexReference $rights_context)

Evaluates can_write_global inside a specific rights context

Parameters

DocumentIndexReference $rights_context

The rights context for which to check the access rights

Return Value

bool

in Model at line 1174
clear_cached_functions(string|bool $function = false)

Clears the cache for all functions or a specific one

Parameters

string|bool $function

in Model at line 616
clear_properties()

No description

at line 800
bool copyToTarget(ListProperties $listProperties = null, bool $with_items = false)

Creates a copy of the list and related list statuses

Parameters

ListProperties $listProperties
bool $with_items

If true creates also a copy of all list items

Return Value

bool

Exceptions

Exception

in Model at line 40
int count_all() $eturns the count of all models, see $this->find('count')

No description

Parameters

) $eturns the count of all models
see $this->find('count'

Return Value

int

in Model at line 40
int count_by_TABLE_COL_and_TABLE_COL2(mixed $COL1_VALUE, mixed $COL2_VALUE)

Returns the count of all models with the specific column value

Parameters

mixed $COL1_VALUE
mixed $COL2_VALUE

Return Value

int

in Model at line 939
string|void debug(bool $show_markers = false, int $mode = 0)

No description

Parameters

bool $show_markers

show markers as well?

int $mode

(0 - print, 1 - return, 2 and 3 - Special PopUps)

Return Value

string|void

at line 502
bool delete()

Delete List and all contained items

Return Value

bool

was delete successful?

Exceptions

AuditException

in Model at line 40
int delete_by_TABLE_COL(mixed $COL_VALUE) Delete rows specified by condition and returns the affected rows. NOTE: This does not trigger a delete() function of the model. If required use pluck('delete')

on the desired collection.

Parameters

mixed $COL_VALUE) Delete rows specified by condition and returns the affected rows. NOTE: This does not trigger a delete() function of the model. If required use pluck('delete'

Return Value

int

in DocumentModel at line 71
void disable_silent_mode()

Disables the silent mode Objects in silent mode do not cause document index job queues, thus saving them is much more performant but does not update the search index, the wall or other similar system modules

Return Value

void

in Model at line 1642
void disable_table_group_id()

Disable the use of the group ID in all queries made

Return Value

void

in DocumentModel at line 60
void enable_silent_mode()

Sets the silent mode to true Objects in silent mode do not cause document index job queues, thus saving them is much more performant but does not update the search index, the wall or other similar system modules

Return Value

void

in Model at line 1667
void enable_table_group_id()

Enable the use of the group ID in all queries made

Return Value

void

in DocumentModel at line 125
static DocumentModel|null fetchByUuid(string $uuid, bool $ignoreCanReadRights = false) deprecated

deprecated This function may cause a fatal error if the class is not available, better use DocumentIndex::fetchRelatedDocumentByUuid()

Get Document by using the uuid

Parameters

string $uuid

hex presentation of uuid

bool $ignoreCanReadRights

Access check is performed by default for this function

Return Value

DocumentModel|null

in Model at line 1218
ModelCollection|Model|int|null find(string $mode = 'all', Condition|ConditionGroup|Query|string|array $conditions = false, array|null $query_params = null)

Find Function to find models using the passed condition

Parameters

string $mode

Find mode (all/first/count)

Condition|ConditionGroup|Query|string|array $conditions

Conditions passed as field query string (e.g. 'id=1 and name="TEST"') or as legacy array: First Element contains query, 2..n contain Parameters

array|null $query_params

Further query parameters (e.g. limit, order_by, request_cache)

Return Value

ModelCollection|Model|int|null

depending from $mode: ALL: ModelCollection; FIRST: Model | boolean false on fail COUNT: int

in Model at line 40
ModelCollection|Model[] find_all_by_TABLE_COL_and_TABLE_COL2($COL1_VALUE, $COL2_VALUE, $params=['order_by'=>'COL1, 5]] $)

Returns loaded ModelCollection

Parameters

$COL1_VALUE
$COL2_VALUE
$params=['order_by'=>'COL1
5]] $

Return Value

ModelCollection|Model[]

at line 83
ListProperties[] find_all_by_active(string|array $active, mixed $sql_params)

No description

Parameters

string|array $active
mixed $sql_params

Return Value

ListProperties[]

at line 83
ListProperties[] find_all_by_category_id(int|int[] $category_id, mixed $sql_params)

No description

Parameters

int|int[] $category_id
mixed $sql_params

Return Value

ListProperties[]

at line 83
ListProperties[] find_all_by_category_id_and_active(int|int[] $selectedCategoryID, string|array $active, array $params = [])

No description

Parameters

int|int[] $selectedCategoryID
string|array $active
array $params

Return Value

ListProperties[]

at line 83
ListProperties[] find_all_by_category_id_and_active_and_title(mixed $categories, string|array $active, array $array, array $array1)

No description

Parameters

mixed $categories
string|array $active
array $array
array $array1

Return Value

ListProperties[]

at line 83
ListProperties[] find_all_by_form_identifier(string|string[] $identifier, mixed $sql_params)

No description

Parameters

string|string[] $identifier
mixed $sql_params

Return Value

ListProperties[]

at line 83
ListProperties[] find_all_by_id(mixed $id, mixed $sql_params)

No description

Parameters

mixed $id
mixed $sql_params

Return Value

ListProperties[]

in Model at line 40
Model find_by_TABLE_COL(mixed $COL_VALUE, mixed $params = ['order_by'=>'COL1)

Returns all models with a specific column value. Query params can be e.g. order_by

Parameters

mixed $COL_VALUE
mixed $params

Return Value

Model

at line 83
ListProperties find_by_form_identifier(string $identifier, mixed $sql_params)

No description

Parameters

string $identifier
mixed $sql_params

Return Value

ListProperties

at line 83
ListProperties find_by_id(mixed $id, mixed $sql_params)

No description

Parameters

mixed $id
mixed $sql_params

Return Value

ListProperties

in Model at line 1402
protected Query functionNameToQuery(string $query, array $parameters)

Converts a findby* function name to SQL query.

Parameters

string $query
array $parameters

Return Value

Query

Returns a Query Object with the relevant WHERE Scopes

at line 642
ListItemCollection getAccessibleItems(FacetedFilter|null $faceted = null, string|null $viewMode = 'user', string|null $order_field = "friendly_id", string|null $order_by = "ASC", int|null $start = null, int|null $limit = null)

Get all accessible items for current user as unloaded collection

Parameters

FacetedFilter|null $faceted

= ['list_status'=>$statusId, 'workflow_status'=>$workflowStatusShortID, 'facetted_1'=>$facet1_filter] The filters for the status_id and the facetted_1 - 5 fields

string|null $viewMode
string|null $order_field
string|null $order_by
int|null $start

SQL Limit Start

int|null $limit

SQL Limit Count

Return Value

ListItemCollection

in AuditableTrait at line 166
array getAuditEvents()

Get audit events

Return Value

array

in AuditableTrait at line 220
array getAuditExcludeProperties()

Get the (Auditable) properties excluded from audit.

Defaults to primary_key and timestamps

Return Value

array

in AuditableTrait at line 199
array getAuditIncludeProperties()

Get the auditable properties to include in audit Defaults to all attributes in the DB Schema

Return Value

array

in AuditableTrait at line 183
AuditTrail[]|ModelCollection getAuditTrail(int $limit = 50)

Get the last auditTrail records for current Model

Parameters

int $limit

Return Value

AuditTrail[]|ModelCollection

at line 1054
ModelCollection|null getAvailableWorkflowStatuses()

Returns a scoped model collection of workflow statuses that belong to this list (process_workflow_id).

Return Value

ModelCollection|null

in Model at line 1857
array getChangedProperties(bool $returnOldValues = false)

Return properties which have been changed after model was initialized/loaded We know these values have been changed locally, but these changes are NOT necessarily reflecting the DB diff

Parameters

bool $returnOldValues

Return values before change or current value after change?

Return Value

array ['property_key'=>'property_value']

in Model at line 970
ModelCollection getCollectionByQuery(string $model_name, array|string $dbquery_result, string $population_mode = 'full', string $post_fill_function = 'update')

No description

Parameters

string $model_name

Model Name, eg.g. category

array|string $dbquery_result

dbquery Result with one record per model OR SQL query

string $population_mode

Population Mode (full or id) - If set to full all object data will be used to fill the objects, if set to id each model will be initialized with the corresponding record id as parameter

string $post_fill_function

Post-Fill Function is triggered on the each model after an object has been filled with data

Return Value

ModelCollection

Always returns a model collection

in Model at line 191
array getDBSchema(string $field = null)

Get DB Schema if available

Parameters

string $field

Return Value

array

at line 896
array getFieldsByType($fieldType)

Return FDL for fields of specified type

Parameters

$fieldType

Return Value

array

in Model at line 1806
string[] getI18nPropertyVariants($propertyName, $localeAsKey = false)

Returns a list of all property name variants for all languages, e.g. "title_i18n" -> "title_i18n, title_DE_DE, title_EN_EN"

Parameters

$propertyName
$localeAsKey

Return Value

string[]

in Model at line 1914
I18nTokenHelper getI18nTokenForProperty(string $i18nProperty, int|null $limitString = null)

Gets an I18nToken for a model property (e.g. title_i18n)

Parameters

string $i18nProperty

The property name (e.g. title_i18n)

int|null $limitString

The translated string will be only $limitString amount of characters long (Adds '...' at the end of the string)

Return Value

I18nTokenHelper

at line 340
ListStatusCollection getListStatusCollection()

No description

Return Value

ListStatusCollection

in DocumentModel at line 49
Controller getMod()

No description

Return Value

Controller

at line 83
ListPropertiesCollection getModelCollection()

No description

at line 764
array getOrderFieldBy(string $order_field = null, string $order_by = 'ASC')

Function will return an order field to be used in SQL or Collection sorting

Parameters

string $order_field
string $order_by

Return Value

array

at line 936
ModelCollection getPresets(bool $activeOnly = true)

No description

Parameters

bool $activeOnly

Return Value

ModelCollection

in Model at line 334
int|null getPrimaryKeyValue()

Get the primary id (post_id) for this model

Return Value

int|null

in Model at line 492
array getPropertyMarkers(bool $value_discovery = true)

Return properties and markers

Parameters

bool $value_discovery

Return Value

array

in ScopesTrait at line 217
Query getScopeQuery(bool $applyDefaultScopes = true)

Returns the Query object which is being used for building the query The function creates a new Query object if required to enable lazy loading

Parameters

bool $applyDefaultScopes

Return Value

Query

at line 739
array getSecondarySortableFields(string $order_field, int $secondarySortFieldCount = 2)

No description

Parameters

string $order_field
int $secondarySortFieldCount

Return Value

array

at line 979
array getSortableFields(bool $includeFilterableFields = false)

Returns all the sortable fields of a list, which might be the first 3.

Those fields, which have already been added as filter will be skipped and the following fields in the current field order will be taken instead. Takes 3 fields.

Parameters

bool $includeFilterableFields

Return Value

array

[(string) $fieldID => 'sortable_1']

in Model at line 1827
array getTouchedProperties(bool $returnOldValues = false)

Return properties which have been touched/set after model was initialized/loaded We know these values have been set, but they might not have changed

Parameters

bool $returnOldValues

Return values before change or current value after change?

Return Value

array ['property_key'=>'property_value']

at line 353
getUniqueField()

No description

at line 127
Category get_category()

Access the list category.

Return Value

Category

in DocumentModel at line 882
DocumentItem get_cf()

Return the cf library for this model type

Return Value

DocumentItem

The content first library

in Model at line 1611
string get_created_at_formatted()

Return a Formatted DateTime

Return Value

string

in Model at line 520
array get_db_properties()

Returns all properties which are available as DB field (= can be used as find_by() properties) with its currently known raw value Please note that smartTimeFields (updated_at, created_at) are not converted to mysql-date format

Return Value

array ['id'=>'1','example_prop'=>'example_val','created_at'=>'']

at line 316
ListStatus get_default_status()

No description

Return Value

ListStatus

in DocumentModel at line 135
DocumentIndex|null get_document_index()

Returns the related document index.

Return Value

DocumentIndex|null

in DocumentModel at line 826
DocumentRegistry|null get_document_registry_info()

Return the information from the document registry This information contains additional meta data as well as relational information

Return Value

DocumentRegistry|null

in DocumentModel at line 243
get_document_tmp_folder()

Returns the path for this documents storage path This folder is automatically cleared when the document is removed

at line 369
array get_facetted_fields(bool $ignore_limit = false, bool $return_status = false)

Returns the form field IDs for the facetted filter fields facetted_1 - facetted_5 in the list item, but not the list status, because it is saved in a separate row.

Parameters

bool $ignore_limit

Will return more than MAX_FILTERS

bool $return_status

Returns the status field, too, but doesn't count it against the limit

Return Value

array

[$fieldid => facetted{1 - 5}

at line 386
array get_facetted_values(string $id)

Returns all distinct values of a facetted field.

Parameters

string $id

Field ID, e.g AF-123ABC

Return Value

array

at line 261
array get_form_fdl(string $show_only = 'all')

Return the current form in FDL array format

Parameters

string $show_only

all|form|table|filter: Returns the FDL which has the show_in_xxx checkbox set

Return Value

array

Form Description Array

in Model at line 1784
bool|mixed get_i18n_property(string $property, string $force_language = false)

Return the property translated property value if available

Parameters

string $property

e.g. title_i18n

string $force_language

FALSE will use current user language, otherwise the passed LOCALE will be used

Return Value

bool|mixed

in Model at line 351
string|null get_model_name()

Returns the SQL table of this model (if available)

Return Value

string|null

Full qualified table name e.g. xmi_crm01_contact

in Model at line 312
string|bool get_model_table_name(string $table_name = null)

Returns the SQL table of this model (if available)

Parameters

string $table_name

Simple table without instance or system prefix

Return Value

string|bool

Full qualified table name e.g. xmi_crm01_contact

in Model at line 474
array get_properties(bool $value_discovery = true)

Returns the complete properties array

Parameters

bool $value_discovery

Retrieve all values by get_property access method

Return Value

array

in Model at line 508
array get_properties_meta(?string $field = null)

No description

Parameters

?string $field

if given returns the meta for that field

Return Value

array

in Model at line 434
mixed get_property(string|null $property_id, bool $get_raw_value = false)

No description

Parameters

string|null $property_id

Marker ID

bool $get_raw_value

deactivate Marker-Function gets triggered

Return Value

mixed

Marker Content

in Model at line 1772
static mixed|null get_request_cache(string $key)

Return Cache Entry if it exists

Parameters

string $key

Cache Key

Return Value

mixed|null

in DocumentModel at line 82
bool get_silent_mode()

Returns if the silent mode is currently active Objects in silent mode do not cause document index job queues, thus saving them is much more performant but does not update the search index, the wall or other similar system modules

Return Value

bool

at line 295
array get_status_pop_data()

No description

Return Value

array

in Model at line 303
string|null get_table_name()

Returns the table name of this model.

Return Value

string|null

in Model at line 325
string|null get_table_primary_key()

No description

Return Value

string|null

Primary Key Field in DB

in Model at line 1620
string get_updated_at_formatted()

Return a Formatted DateTime

Return Value

string

in DocumentModel at line 852
Document|null get_xui_document()

Get XUI Document Representation

Return Value

Document|null

in DocumentModel at line 904
void handle_reference_delete(DocumentIndexReference $reference, int $event_user_id = null)

Function is called in routine as part of the index event 'delete' Be aware that the original referenced document will not exist at time of calling This event/callback gives the opportunity to clean up the existing reference (e.g. you are referencing to this document and it you need to act upond this element being deleted)

Can be implemented in document models

Parameters

DocumentIndexReference $reference
int $event_user_id

User ID of user who triggered the delete

Return Value

void

in Model at line 1868
bool hasChangedProperties()

No description

Return Value

bool

in Model at line 807
bool hasExistingDatabaseRecord()

Does this model represent an existing database record? (can be updated)

Return Value

bool

at line 885
bool hasField(string $fieldType)

Has this list a field of a certain type?

Parameters

string $fieldType list_status,

Return Value

bool

at line 928
bool hasPresets(bool $activeOnly = true)

No description

Parameters

bool $activeOnly

Return Value

bool

in Model at line 1835
bool hasTouchedProperties()

Returns true if at least one property is marked as changed

Return Value

bool

in Model at line 210
init(bool $auto_load = true)

Initializes the model

Parameters

bool $auto_load

If set to false the init will NOT TRIGGER load in case of a set primary key property

in AuditableTrait at line 43
initAuditableTrait()

Init Method

at line 916
bool isActive()

No description

Return Value

bool

at line 924
bool isActiveAndClosed()

No description

Return Value

bool

at line 920
bool isActiveAndOpen()

No description

Return Value

bool

in AuditableTrait at line 233
bool isAuditingEnabled()

Determine whether auditing is enabled.

Defaults to true for Frontend/UI Actions and false for CLI/Console Actions

Return Value

bool

at line 958
bool isWorkflowList(bool $showStatusCondition = false)

Check, whether this list is a list whose items should be processed via workflows.

Parameters

bool $showStatusCondition

Should the property 'show_workflow_status' be taken into account when checking this?

Return Value

bool

'True' if this list is processed via workflows; 'false' if not.

in Model at line 390
load()

No description

in Model at line 837
protected bool load_from_db(string $table_name = null, array $key_fields = [])

No description

Parameters

string $table_name

Table Name

array $key_fields

Key fields which should be used as WHERE condition

Return Value

bool

at line 997
localReIndex()

Reindex local items to save items

in DocumentModel at line 932
void onRestore()

Automatically recover document index if document model is restored

Return Value

void

at line 909
SearchIndexRecord onSearchIndexUpdate(SearchIndexRecord $baseIndexRecord)

No description

Parameters

SearchIndexRecord $baseIndexRecord

Return Value

SearchIndexRecord

in DocumentModel at line 943
static array parseIdRefProperty(mixed $documentIndexValues = null)

Function to parse a property which is supposed to contain id references

Parameters

mixed $documentIndexValues

Return Value

array ids

in Model at line 1062
ModelCollection|Model[] populate_model_by_query(string $model_name, array|string $dbquery_result, string $population_mode = 'full', string $post_fill_function = 'update') deprecated

deprecated Please use getCollectionByQuery() instead

No description

Parameters

string $model_name

Model Name, eg.g. category

array|string $dbquery_result

dbquery Result with one record per model OR SQL query

string $population_mode

Population Mode (full or id) - If set to full all object data will be used to fill the objects, if set to id each model will be initialized with the corresponding record id as parameter

string $post_fill_function

Post-Fill Function is triggered on the each model after an object has been filled with data

Return Value

ModelCollection|Model[]

empty array if none found and compatibility-mode on (xelos model_version < 1)

in ScopesTrait at line 127
protected void registerDefaultScope($scopeName)

Registers the passed scope as default scope A default scope is present when the model is being loaded and can be removed using the unscope() function if required The passed scope must be defined in a scope[SCOPE_NAME] function e.g. scopeGroupId

Parameters

$scopeName

Return Value

void

in Model at line 161
reload_schema()

Reloads the schema of the model

in DocumentModel at line 230
final remove_document_index()

removes index-entry of this model (only marking to delete).

the real delete operation will be triggered by the document_index_deamon. (will be automatically trigged at: DocumentModel->delete())

Exceptions

AuditException

in DocumentModel at line 259
protected bool remove_from_db(string $table_name, array $key_fields = null)

No description

Parameters

string $table_name

Table Name

array $key_fields

Key fields which should be used as WHERE condition

Return Value

bool

Exceptions

Exception

in DocumentModel at line 841
string|null render()

Generic Renderer

Return Value

string|null

in DocumentModel at line 350
static void resetRightsCache(int $document_index_id)

No description

Parameters

int $document_index_id

Return Value

void

in ScopesTrait at line 231
void resetScopeQuery()

Reset Scope to null

Return Value

void

in DocumentModel at line 739
DocumentIndexReference|null resolve_rights_context(null|string $right = null, bool $apply = false)

Loads the rights context by checking all possible rights context and return it without apply on this model.

Parameters

null|string $right

Keep empty for read and write or set read or write

bool $apply

Return Value

DocumentIndexReference|null

at line 1010
bool runsWorkflowProcesses()

Is this list a workflow list and are there workflow items running, that depend on this list?

Return Value

bool

at line 519
int|bool save()

No description

Return Value

int|bool

Integer represents ID of saved record, true for successful modifications (update, delete), false otherwise

Exceptions

Exception

in Model at line 633
protected int|bool save_to_db(string $table_name, array $params = array())

No description

Parameters

string $table_name

Table Name

array $params

Return Value

int|bool

Integer represents ID of saved record, true for successful modifications (update, delete), false otherwise

Exceptions

DatabaseException

in Model at line 1381
bool|array schema_values(mixed $field_name)

Provides a list of all values allowed for enumerations.

Returns FALSE if the field in question does not exist Returns TRUE for non enum fields Returns an array for enum fields with all available values

Parameters

mixed $field_name

The name of the field to examine

Return Value

bool|array

in ScopesTrait at line 81
ModelCollection scope(string $scopeName, Query|null $scopeQuery = null)

No description

Parameters

string $scopeName
Query|null $scopeQuery

Return Value

ModelCollection

in ScopesTrait at line 16
ModelCollection scopeAll()

No description

Return Value

ModelCollection

in Model at line 40
Model[] scope_by_TABLE_COL_and_TABLE_COL2(mixed $COL1_VALUE, mixed $COL2_VALUE)

Returns unloaded ModelCollection

Parameters

mixed $COL1_VALUE
mixed $COL2_VALUE

Return Value

Model[]

in ScopesTrait at line 16
ModelCollection scope_by_id(int|array $id)

No description

Parameters

int|array $id

Return Value

ModelCollection

in Model at line 40
void self() $this find_by_id($id)

No description

Parameters

) $this find_by_id($id

Return Value

void

in DocumentModel at line 148
setDocumentIndex(DocumentIndex|null $documentIndex)

Sets the related document index.

Parameters

DocumentIndex|null $documentIndex

in ScopesTrait at line 88
void setModelCollectionReference(ModelCollection $modelCollectionReference)

No description

Parameters

ModelCollection $modelCollectionReference

Return Value

void

at line 328
set_default_status(ListStatus $default_status) deprecated

deprecated Workflow Workaround - remove

No description

Parameters

ListStatus $default_status

in Model at line 599
void set_properties_from_array(array $input, array|bool $filter = false)

No description

Parameters

array $input

Assoc array with field_id=>value

array|bool $filter

Filter array with 1-dim field_id's, only these keys from input will be set

Return Value

void

in Model at line 540
set_property(string|array $property_id, mixed $property_value = false, bool $no_change = false)

Set a Property. If $property_id is an array and $property_value is false, set_property is called for each element in the array with the array key and value as params.

Parameters

string|array $property_id

Marker ID (Can also be an Array)

mixed $property_value Value
bool $no_change

Value

return static

in Model at line 1716
set_render_params(mixed $params = array())

Sets parameter that will be passed to the XUI helpers

Parameters

mixed $params

in Model at line 1756
static set_request_cache(string $key, mixed $value)

Set Request Cache Entry

Parameters

string $key
mixed $value

at line 309
set_status_pop_data(array $statuses) deprecated

deprecated Dirty Workflow Workaround - remove once tested

The status pop data can be set to prevent an additional call to the database to access the statuses multiple times.

Parameters

array $statuses

in SortTrait at line 116
void sortMoveTo(int $id, int $sortTo, array|null $conditions = [])

Sort this element to a specific position

Parameters

int $id

The record ID you intend to move, use 0 if your model has not been saved yet and you intend to save it to the given sort

int $sortTo

Move element to this new position, should be > 0

array|null $conditions

Add conditions

Return Value

void

in SortTrait at line 28
sort_down(int $steps = 1, $params = array())

Decrease Sort Priority (Increases SORT value)

Parameters

int $steps
$params

in SortTrait at line 17
sort_up(int $steps = 1, $params = array())

Increase Sort Priority (Decreases SORT value)

Parameters

int $steps
$params

in Model at line 1675
stop_temporary_group_id_overwrite()

Stops the temporary overwrite of the table_group_id

in Model at line 1657
void temporarily_disable_table_group_id()

Temporarily disable the use of the group ID in all queries made

Return Value

void

in Model at line 1583
string to_json()

Returns the model as JSON array

Return Value

string

Returns model string

in Model at line 1594
string to_string()

Returns the model as STRING

Return Value

string

Returns model as string

in Model at line 1536
string to_xml(array|bool $property_filter = false, bool|DOMDocument $doc = false, DOMElement $parent_element = null)

Returns an XML of all model properties

Parameters

array|bool $property_filter

if given, only the properties in this array are added

bool|DOMDocument $doc

used from model_collection to add this model to an existing structure

DOMElement $parent_element

to add this model as Child, necessary if doc is given

Return Value

string

Returns formatted XML string

in Model at line 1843
void touchProperty($propertyName)

No description

Parameters

$propertyName

Return Value

void

in AuditableTrait at line 59
triggerAuditEvent(Model $model, string $eventKey = AuditableInterface::OBSERVE_EVENT_SAVE)

TBD: Move this method to the audit model? and keep things slim in trait?

Parameters

Model $model
string $eventKey

Exceptions

AuditException

in ScopesTrait at line 56
ModelCollection unscope(string $scopeName = null, Query|null $scopeQuery = null)

Returns an unscoped Collection

Parameters

string $scopeName
Query|null $scopeQuery

Provide a specific Query Object you want to unscope

Return Value

ModelCollection

in DocumentModel at line 159
final bool update_document_index(string $status = IndexEventInterface::EVENT_UPDATE)

updates the related index-item for itself (not global, only for this model!)

Parameters

string $status

Defaults to IndexEventInterface::EVENT_UPDATE

Return Value

bool

was saving of index-item successful?

in SortTrait at line 43
protected int update_sort(mixed $id = false, string $direction = 'up', int $steps = 1, array $params = array())

Update the sort property for a given table (Move a record up/down)

Parameters

mixed $id

(The record ID you intend to move )

string $direction

(The direction you want the record to move)

int $steps

(The amount of steps you want the record to move)

array $params

key 'filter' optional conditions passed as a key-value array. Key 'order_by' additional ORDER string append to ORDER BY sort

Return Value

int

new Sort Value

at line 411
string|true validate(array $fieldErrors)

Tests if the form_identifier is unique and if only 5 facetted fields are selected.

Parameters

array $fieldErrors

Field Errors can be returned via reference as array(array('field'=>$field, 'err_msg'=>$error)) or array($field => $error)

Return Value

string|true

TRUE if everything is correct, String for Error-Message