DocumentIndex
class DocumentIndex extends Model implements AuditableInterface, SoftDeleteInterface
Traits
Trait Auditable to be used in Models
Static Cache Trait Adds a static (per request) cache to the object which can hold data for the time of the request (in the frontend) or a certain duration during long running processes. It works together with the global caching system and enforces a static cache clearing in case of global cache clearings as well.
Trait SoftDeleteTrait to be used in Models, requires deleted_at column in database table
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) |
Properties
Controller read-only | $mod | from SoftDeleteTrait | |
protected | $model_name | var string Name of this model e.g. category or document |
from Model |
string | $table_name | ||
protected bool | $table_use_group_id | ||
protected bool | $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 | |
protected array | $properties_null_values | from Model | |
bool|string | $class_name | from Model | |
string | $render_type | from Model | |
protected int | $model_version | Hint your model version, this parameter might affect certain outcomes and behaviours This version string is added for backwards compatibility |
from Model |
protected string | $model_default_render_xui | Defines a XUI helper which can be used to display this model in the render() function e.g. use 'thread' to use this xui helper "XELOS\Modules\Forum\UI\Thread" of the models parent module |
from Model |
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 int | $max_cached_document_indexes | ||
protected bool | $hasPrefetchRightsContexts | ||
static | $document_registry_info_lookup | ||
int | $id | ||
int | $parent_document | ||
int | $parent_group_document | ||
int | $instance_id | ||
string | $instance_string | ||
int | $post_id | ||
int | $post_type | ||
int | $group_id | ||
int | $user_id | ||
string | $title | ||
string | $thumb_doc | ||
string | $canonical | ||
int | $canonical_parent | ||
int | $canonical_grandparent | ||
int | $canonical_greatgrandparent | ||
$is_hidden | |||
string | $post_created_at | Y-m-d H:i:s |
|
string | $post_updated_at | Y-m-d H:i:s |
|
string | $scheduled_removal_at | Y-m-d H:i:s |
|
DocumentIndex[]|ModelCollection | $references | ||
DocumentModel | $related_document | ||
DocumentIndexReference[] | $possible_rights_context |
Methods
Magic Function Object Cloning Make sure object references are cleaned up as each object requires a clean and separate reference
No description
No description
No description
Calls the passed function only if it is not cached yet, otherwise the previous cached result will be returned
No description
Global named scope scopeAll to use on models to return an unscoped unloaded collection
Called for scopeby Magic Function Creates a new ModelCollection and applies the passed scope
Called for scope_ Magic Function Creates a new ModelCollection and applies the passed custom scope function
No description
Add user as follower. Only add 'auto_follow', if user has no other status
Apply lib->format multi_format on passed property. The result will be written to ->[property]_formatted
Add Document Reference
Adds a condition to scope the following find functions
Makes sure the soft delete minimum keep duration is observed.
Wrapper of original function
No description
Checks whether the related document model is allowing comments.
Wrapper of original function
Wrapper of original function
Wrapper of original function
Wrapper of original function
No description
Changes the title of the document index, publishing the change to the related document.
Clear local static cache of document indexes
Clears the cache for all functions or a specific one
Convert Assoc Multidimensional Array to Model Conditional Array
Returns the count of all models with the specific column value
creates a new job and stores directly to db
Delete this document index and all jobs associated
on the desired collection.
Returns the document index object for given model information.
No description
Find Function to find models using the passed condition
Returns loaded ModelCollection
Returns a collection document index models or false if not found
Returns all document index objects by multiple ids.
No description
No description
No description
Returns all models with a specific column value. Query params can be e.g. order_by
Returns a collection document index model or false if not found
Converts a findby* function name to SQL query.
Get the (Auditable) properties excluded from audit.
Get the auditable properties to include in audit Defaults to all attributes in the DB Schema
Get the last auditTrail records for current Model
Gets the canonical paht of the parent element. Returns null if there is no parent.
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
No description
Returns all document policy clusters for this document
Return a new unscoped model collection for further processing
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
Returns the WHERE SQL Conditions based on the current Condition Separate function to be able to update scopes at this point in time if needed
Returns how many days the soft deleted documents are kept.
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
Function will set related_model for given document index models to improve loading
Return Breadcrumb showing the primary location of this element
No description
Return document index ids representing the canonical of this document The last id will be this document return int[] Array of document_index_ids
No description
Get child elements
Get child elements
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
No description
Returns the displayname of the user of this document
Return the information from the document registry This information contains additional meta data as well as relational information
Get global group_security_id for this document Uses lib->group_security
Return the property translated property value if available
Return Meta information for the instance
No description
No description
No description
Returns the SQL table of this model (if available)
Get a parent element
Get a parent element
Get a parent element
Return all potential canonical paths element The upper container where this element resides in could be refered
No description
No description
Get all document_index which are referenced from the current document_index
Returns the number of references
Get all document_index references this document has
Get all document_references which are pointing to this current document_index
Get the original document model
No description
Returns an url to the thumb of this document if available
Get title
Returns the goto URL for this specific document
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)
Check wether we have a dependency relation for this document, which is active and accessible to the current user
No description
Injects the document index object into a related model by setter injection.
Is user a follower ?
Returns if this document index is marked "hidden"
No description
Called when the model is restored.
Called when softDelete is executed.
No description
Prefetch document indexes in single batch for later usage via cache
Execute Query of find() function. Can be modified by child class if necessary
Create queue for existing documents for reindex.
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
Remove user as follower
Generic Renderer
No description
No description
Provides a list of all values allowed for enumerations.
Returns unloaded ModelCollection
No description
Updates the hidden flag for this document index and all children if so desired
type-safe setter
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.
Sets parameter that will be passed to the XUI helpers
Mark this model as deleted by setting deleted_at to current time
Sort this element to a specific position
Decrease Sort Priority (Increases SORT value)
Increase Sort Priority (Decreases SORT value)
Clears the specified cache pool from the static cache
Retrieves a value from the static cache
Returns an array of all cache keys which have been set
Returns an key/value array with all cached values from the passed pool
Checks if the passed is key has a value set
Removes the passed key
Store a value in the static cache
Temporarily disable the use of the group ID in all queries made
Temporarily enables the use of the group ID in all queries made
Returns an XML of all model properties
TBD: Move this method to the audit model? and keep things slim in trait?
No description
Removes all scopes (including Default Scopes)
No description
Update the document index with the details from the referenced document model
Update the sort property for a given table (Move a record up/down)
Details
in
Model at line 994
ModelCollection|Model|Model[]|int
__call(string $method, array $args = array())
No description
in
Model at line 1544
__clone()
Magic Function Object Cloning Make sure object references are cleaned up as each object requires a clean and separate reference
at line 85
__construct(int|bool $id = false)
No description
in
Model at line 963
mixed
__get(mixed $var)
No description
in
Model at line 1601
__isset($name)
No description
in
Model at line 976
mixed
__set(mixed $var, mixed $value)
No description
at line 2053
__sleep()
No description
in
Model at line 1553
string
__toString()
String Representation of this object (calls for render method)
at line 2061
__wakeup()
No description
in
Model at line 1032
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
at line 959
DocumentModel|false
_cb_get_related_document()
No description
in
ScopesTrait at line 81
Query
_scopeAll(Query $Query)
Global named scope scopeAll to use on models to return an unscoped unloaded collection
in
ScopesTrait at line 90
Query
_scopeDefault(Query $Query)
Load default scopes
in
SoftDeleteTrait at line 34
_scopeNotDeleted(Query $query)
No description
in
SoftDeleteTrait at line 40
_scopeSoftDeleted(Query $query)
No description
in
ScopesTrait at line 119
protected ModelCollection
_scope_by(mixed $fn, mixed $parameters)
Called for scopeby Magic Function Creates a new ModelCollection and applies the passed scope
in
ScopesTrait at line 132
protected ModelCollection
_scope_custom(mixed $fn)
Called for scope_ Magic Function Creates a new ModelCollection and applies the passed custom scope function
in
AuditableTrait at line 97
AuditTrail|null
addAuditTrail(string $event = AuditableInterface::AUDIT_EVENT_MISC, string|null $customMessage = null)
No description
at line 1561
add_follow_user(int|bool $user_id = false, string $status = Follows::STATUS_FOLLOW, bool $with_notification = false)
Add user as follower. Only add 'auto_follow', if user has no other status
in
Model at line 823
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
at line 1701
int
add_reference(DocumentIndex|int $document_index_id, int $type = 0, string $level = 'read')
Add Document Reference
in
ScopesTrait at line 32
ModelCollection
add_scope_condition(Condition|Query|string $new_condition)
Adds a condition to scope the following find functions
in
Model at line 36
Model[]
all(mixed $params = ['order_by'=>'COL1)
Return all models
in
SoftDeleteTrait at line 135
bool
canForceDelete()
Makes sure the soft delete minimum keep duration is observed.
e.g. document was deleted 30 days ago, but the keep duration was increased to 120 days.
at line 1895
can_read()
Wrapper of original function
at line 1998
bool
can_read_comments()
No description
at line 2013
bool
can_read_comments_global(bool $return_hidden = false)
Checks whether the related document model is allowing comments.
at line 1935
can_read_global($return_hidden = false)
Wrapper of original function
at line 1955
can_see()
Wrapper of original function
at line 1971
can_write()
Wrapper of original function
at line 1982
can_write_global($return_hidden = false)
Wrapper of original function
at line 927
DocumentModel|null
cb_get_deleted_related_document()
No description
at line 1214
bool
change_title(mixed $title)
Changes the title of the document index, publishing the change to the related document.
The title cannot be changed if the related document is not available or cannot be written to. The current user MUST have can_write_global in order to change the title of the document
at line 481
clear_cache()
Clear local static cache of document indexes
in
Model at line 1051
clear_cached_functions(string|bool $function = false)
Clears the cache for all functions or a specific one
in
Model at line 567
clear_properties()
No description
in
Model at line 1228
array
convert_array_to_conditions(array $params = array())
Convert Assoc Multidimensional Array to Model Conditional Array
at line 450
int
countNotIndexedDocuments(DocumentRegistry $document_registry)
No description
in
Model at line 36
int
count_all()
Returns the count of all models
in
Model at line 36
Model[]
count_by_TABLE_COL_and_TABLE_COL2(mixed $COL1_VALUE, mixed $COL2_VALUE)
Returns the count of all models with the specific column value
at line 1136
create_job(string $status, string|null $scheduledAt = null)
creates a new job and stores directly to db
in
Model at line 808
string|void
debug(bool $show_markers = false, int $mode = 0)
No description
at line 760
bool
delete()
Delete this document index and all jobs associated
in
Model at line 36
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.
in
Model at line 1497
void
disable_table_group_id()
Disable the use of the group ID in all queries made
in
Model at line 1520
void
enable_table_group_id()
Enable the use of the group ID in all queries made
at line 218
static DocumentIndex|null
fetchDocumentIndex(int $instanceId, int $postType, int $postId)
Returns the document index object for given model information.
This uses an internal cache if already fetched.
at line 253
static ModelCollection|DocumentIndex[]
fetchDocumentIndexes(int $instanceId, int $postType, array $postIds)
No description
in
Model at line 1094
mixed
find(string $mode = 'all', mixed $conditions = false, mixed $query_params = false)
Find Function to find models using the passed condition
in
Model at line 36
ModelCollection|Model[]
find_all_by_TABLE_COL_and_TABLE_COL2($COL1_VALUE, $COL2_VALUE, $params=['order_by'=>'COL1, 5]] $)
Returns loaded ModelCollection
at line 411
ModelCollection|DocumentIndex[]
find_all_by_id(int[] $document_index_ids, bool $force_new = false)
Returns a collection document index models or false if not found
at line 390
ModelCollection|DocumentIndex[]
find_all_by_ids(array $ids)
Returns all document index objects by multiple ids.
at line 53
ModelCollection
find_all_by_parent_document(int $documentIndexId)
No description
at line 53
ModelCollection
find_all_by_parent_group_document(int $documentIndexId)
No description
at line 53
ModelCollection
find_all_by_post_id_and_post_type_and_instance_id(array $missingPostIds, int $postType, int $instanceId)
No description
in
Model at line 36
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
at line 434
DocumentIndex
find_by_id($document_index_id, bool $force_new = false)
Returns a collection document index model or false if not found
in
SoftDeleteTrait at line 73
bool
forceDelete($force = false)
Will execute standard model delete method.
in
Model at line 1286
Query
functionNameToQuery(string $query, array $parameters)
Converts a findby* function name to SQL query.
in
AuditableTrait at line 166
array
getAuditEvents()
Get audit events
in
AuditableTrait at line 220
array
getAuditExcludeProperties()
Get the (Auditable) properties excluded from audit.
Defaults to primary_key and timestamps
in
AuditableTrait at line 199
array
getAuditIncludeProperties()
Get the auditable properties to include in audit Defaults to all attributes in the DB Schema
in
AuditableTrait at line 183
AuditTrail[]|ModelCollection
getAuditTrail(int $limit = 50)
Get the last auditTrail records for current Model
at line 498
string|null
getCanonicalParent(bool $autogenerate = false)
Gets the canonical paht of the parent element. Returns null if there is no parent.
in
Model at line 1685
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
in
Model at line 839
ModelCollection
getCollectionByQuery(string $model_name, array|string $dbquery_result, string $population_mode = 'full', string $post_fill_function = 'update')
No description
in
Model at line 187
array
getDBSchema()
Get DB Schema if available
at line 289
array|ModelCollection
getDocumentPolicyClusters(bool $allowRecalc = false, bool $forceRecalc = false)
Returns all document policy clusters for this document
in
Model at line 1066
ModelCollection
getModelCollection()
Return a new unscoped model collection for further processing
in
Model at line 450
array
getPropertyMarkers(bool $value_discovery = true)
Return properties and markers
in
ScopesTrait at line 212
Query
getScopeQuery()
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
in
ScopesTrait at line 202
protected string
getScopeQueryConditionSQL()
Returns the WHERE SQL Conditions based on the current Condition Separate function to be able to update scopes at this point in time if needed
in
SoftDeleteTrait at line 124
int
getSoftDeleteKeepDays()
Returns how many days the soft deleted documents are kept.
in
Model at line 1666
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
at line 811
array
get_all_related_documents(DocumentIndex[]|ModelCollection $document_indices)
Function will set related_model for given document index models to improve loading
at line 634
Breadcrumb
get_breadcrumb()
Return Breadcrumb showing the primary location of this element
at line 485
get_canonical($autogenerate = false)
No description
at line 623
get_canonical_document_index_ids()
Return document index ids representing the canonical of this document The last id will be this document return int[] Array of document_index_ids
at line 515
get_canonical_url()
No description
at line 1104
ModelCollection
get_children_document()
Get child elements
at line 1112
ModelCollection
get_children_group()
Get child elements
in
Model at line 1472
string
get_created_at_formatted()
Return a Formatted DateTime
in
Model at line 479
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
at line 919
DocumentModel|null
get_deleted_related_document()
No description
at line 744
get_displayname()
Returns the displayname of the user of this document
at line 985
DocumentRegistry|bool
get_document_registry_info()
Return the information from the document registry This information contains additional meta data as well as relational information
at line 597
get_group_security_id()
Get global group_security_id for this document Uses lib->group_security
in
Model at line 1642
bool|mixed
get_i18n_property(string $property, string $force_language = false)
Return the property translated property value if available
at line 613
array
get_instance_meta()
Return Meta information for the instance
at line 903
Core|false
get_instance_obj()
No description
at line 601
get_instance_string()
No description
at line 693
get_instance_url()
No description
in
Model at line 317
string
get_model_name()
Returns the SQL table of this model (if available)
in
Model at line 296
string|bool
get_model_table_name(string $table_name = null)
Returns the SQL table of this model (if available)
at line 1060
DocumentIndex
get_parent()
Get a parent element
at line 1088
DocumentIndex
get_parent_document_index()
Get a parent element
at line 1073
DocumentIndex
get_parent_group()
Get a parent element
at line 867
array
get_paths()
Return all potential canonical paths element The upper container where this element resides in could be refered
at line 883
DocumentIndexReference[]|ModelCollection
get_possible_rights_context()
No description
in
Model at line 430
array
get_properties(bool $value_discovery = true)
Returns the complete properties array
in
Model at line 466
array
get_properties_meta(bool|string $field = false)
No description
in
Model at line 397
mixed
get_property(string $property_id, bool $get_raw_value = false)
No description
at line 523
Document[]
get_recent_documents($limit = false)
No description
at line 1758
DocumentIndex[]|ModelCollection
get_referenced_from(int $type = 0, int $source_instance_id = null, DocumentIndex $source_document_index = null)
Get all document_index which are referenced from the current document_index
at line 1844
int
get_referenced_from_count(int $type = 0, int $source_instance_id = null)
Returns the number of references
at line 1734
DocumentIndex[]|ModelCollection
get_references(int $type = 0)
Get all document_index references this document has
at line 1803
DocumentIndexReference[]|ModelCollection
get_references_from(int $type = 0, int $source_instance_id = null, DocumentIndex $source_document_index = null)
Get all document_references which are pointing to this current document_index
at line 779
DocumentModel
get_related_document()
Get the original document model
in
Model at line 1630
static mixed|null
get_request_cache(string $key)
Return Cache Entry if it exists
at line 1048
$this
get_root()
No description
in
Model at line 287
string
get_table_name()
Returns the table name of this model.
in
Model at line 309
string
get_table_primary_key()
No description
at line 1121
string
get_thumb_url($width = 100, $height = 100, $return_empty = true)
Returns an url to the thumb of this document if available
at line 729
string
get_title()
Get title
in
Model at line 1481
string
get_updated_at_formatted()
Return a Formatted DateTime
at line 689
string
get_url()
Returns the goto URL for this specific document
at line 1884
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)
at line 1010
false|string
hasAccessibleDependencyInstanceRelation(string $moduleName = 'comments')
Check wether we have a dependency relation for this document, which is active and accessible to the current user
in
Model at line 1696
bool
hasChangedProperties()
No description
in
Model at line 1673
bool
hasTouchedProperties()
No description
at line 800
has_related_document()
No description
in
Model at line 199
init(bool $auto_load = true)
Initializes the model
in
AuditableTrait at line 43
initAuditableTrait()
Init Method
in
SoftDeleteTrait at line 30
initSoftDeleteTrait()
No description
at line 371
static
injectDocumentIndex(DocumentModel $model)
Injects the document index object into a related model by setter injection.
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
in
SoftDeleteTrait at line 107
bool
isSoftDeleted()
No description
at line 1626
Follows[]|ModelCollection|false
is_follow_user(int $user_id = null)
Is user a follower ?
at line 1906
bool
is_hidden()
Returns if this document index is marked "hidden"
in
Model at line 355
load()
No description
in
Model at line 698
protected bool
load_from_db(string $table_name, array|bool $key_fields = false)
No description
at line 555
mark_document_recent($user_id, string $type = 'edit')
No description
in
SoftDeleteTrait at line 154
onForceDelete()
No description
at line 2065
void
onRestore()
Called when the model is restored.
at line 2076
void
onSoftDelete()
Called when softDelete is executed.
in
Model at line 932
ModelCollection|Model[]
populate_model_by_query(string $model_name, array|string $dbquery_result, string $population_mode = 'full', string $post_fill_function = 'update')
deprecated
deprecated
No description
at line 99
static void|DocumentIndex[]
prefetch_document_indexes(array $document_index_ids, bool $force_new = false)
Prefetch document indexes in single batch for later usage via cache
in
Model at line 1246
protected array
process_find_query(mixed $select_field, mixed $query_params)
Execute Query of find() function. Can be modified by child class if necessary
at line 1182
queueExistingDocuments(array $instanceIds = [])
Create queue for existing documents for reindex.
If no instance ids are given, this will effect all documents.
in
ScopesTrait at line 105
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
in
Model at line 160
reload_schema()
Reloads the schema of the model
at line 1590
remove_follow_user(int $user_id = null, bool $delete = false)
Remove user as follower
in
Model at line 773
protected bool
remove_from_db(string $table_name, array $key_fields = null)
No description
at line 2027
null
render()
Generic Renderer
at line 2038
Template|string
renderPreview()
No description
at line 772
reset_related_document()
No description
in
SoftDeleteTrait at line 91
restore()
Recover soft deleted item
in
Model at line 327
int|bool
save()
No description
in
Model at line 584
protected int|bool
save_to_db(string $table_name, array $params = array())
No description
in
Model at line 1266
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
in
ScopesTrait at line 14
ModelCollection
scopeAll()
No description
in
SoftDeleteTrait at line 28
ModelCollection
scopeNotDeleted()
Default active scope.
in
SoftDeleteTrait at line 28
ModelCollection
scopeSoftDeleted()
Scope to return only soft deleted records.
in
Model at line 36
Model[]
scope_by_TABLE_COL_and_TABLE_COL2(mixed $COL1_VALUE, mixed $COL2_VALUE)
Returns unloaded ModelCollection
in
Model at line 36
void
self() $this find_by_id($id)
No description
in
ScopesTrait at line 71
void
setModelCollectionReference(ModelCollection $modelCollectionReference)
No description
at line 399
setPrefetchRightsContexts(array $rightContexts)
No description
at line 1916
set_hidden(bool $include_subtree = false, bool $hidden = true)
Updates the hidden flag for this document index and all children if so desired
at line 737
set_post_type(int $post_type)
type-safe setter
in
Model at line 550
void
set_properties_from_array(array $input, array|bool $filter = false)
No description
in
Model at line 499
set_property(string|array $property_id, string|bool $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.
in
Model at line 1574
set_render_params(mixed $params = array())
Sets parameter that will be passed to the XUI helpers
in
Model at line 1614
static
set_request_cache(string $key, mixed $value)
Set Request Cache Entry
in
SoftDeleteTrait at line 54
int|bool|null
softDelete()
Mark this model as deleted by setting deleted_at to current time
in
SortTrait at line 116
void
sortMoveTo(int $id, int $sortTo, array|null $conditions = [])
Sort this element to a specific position
in
SortTrait at line 28
sort_down(int $steps = 1, $params = array())
Decrease Sort Priority (Increases SORT value)
in
SortTrait at line 17
sort_up(int $steps = 1, $params = array())
Increase Sort Priority (Decreases SORT value)
in
StaticCacheTrait at line 121
static void
staticCacheClearAllCachePools()
No description
in
StaticCacheTrait at line 114
static void
staticCacheClearCachePool($cache_pool = 'default')
Clears the specified cache pool from the static cache
in
StaticCacheTrait at line 61
static array|string|int|bool|null
staticCacheGet($key, string $cache_pool = 'default')
Retrieves a value from the static cache
in
StaticCacheTrait at line 98
static array
staticCacheGetKeys(string $cache_pool = 'default')
Returns an array of all cache keys which have been set
in
StaticCacheTrait at line 107
static array
staticCacheGetPool($cache_pool)
Returns an key/value array with all cached values from the passed pool
in
StaticCacheTrait at line 34
static bool
staticCacheIsEnabled()
No description
in
StaticCacheTrait at line 85
static bool
staticCacheIsSet($key, string $cache_pool = 'default')
Checks if the passed is key has a value set
in
StaticCacheTrait at line 73
static
staticCacheRemove($key, string $cache_pool = 'default')
Removes the passed key
in
StaticCacheTrait at line 46
static void
staticCacheSet(string|int $key, mixed $value, string $cache_pool = 'default')
Store a value in the static cache
in
Model at line 1536
stop_temporary_group_id_overwrite()
Stops the temporary overwrite of the table_group_id
in
Model at line 1511
void
temporarily_disable_table_group_id()
Temporarily disable the use of the group ID in all queries made
in
Model at line 1528
void
temporarily_enable_table_group_id()
Temporarily enables the use of the group ID in all queries made
in
Model at line 1444
string
to_json()
Returns the model as JSON array
in
Model at line 1455
string
to_string()
Returns the model as STRING
in
Model at line 1397
string
to_xml(array|bool $property_filter = false, bool|DOMDocument $doc = false, DOMElement $parent_element = null)
Returns an XML of all model properties
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?
at line 583
unmark_document_recent($user_id)
No description
in
ScopesTrait at line 49
ModelCollection
unscope($scopeName = false)
Removes all scopes (including Default Scopes)
at line 191
static
updateIndexCache(array $indexes)
No description
at line 1251
bool
update_details()
Update the document index with the details from the referenced document model
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)
in
Model at line 951
string|true
validate(array $fieldErrors)
No description
in
SoftDeleteTrait at line 46
withDeleted()
No description