class DocumentIndex extends Model

Properties

Core $mod from Model
protected $model_name var string Name of this model e.g. category or document from Model
$table_name
protected $table_use_group_id
protected $table_auto_properties
protected string $table_primary_key from Model
protected array $model_scope_conditions from Model
protected $properties
protected array $properties_meta from Model
protected array $markers from Model
protected array $properties_null_values from Model
static $method_exists_cache 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
boolean $loaded from Model
boolean $saved from Model
array $changed from Model
array $cache_function_result from Model
static array $_request_cache from Model
static $cache
static $max_cached_document_indexes
static $document_registry_info_lookup
int $id
int $parent_document
int $parent_group_document
int $instance_id
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
int $is_hidden
string $post_created_at Y-m-d H:i:s
string $post_updated_at Y-m-d H:i:s
DocumentIndex[]|ModelCollection $references
$related_document
DocumentIndexReference[] $possible_rights_context

Methods

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

No description

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

No description

from Model
mixed
__get(mixed $var)

No description

from Model
__isset($name)

No description

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

No description

from Model
__sleep()

No description

null|string
__toString()

String Representation of this object (calls for render method)

from Model
__wakeup()

No description

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
xelos_model|false
_cb_get_related_document()

No description

_scope_by(mixed $fn, mixed $parameters)

put your comment there.

from Model
add_follow_user(int|bool $user_id = false, string $status = 'follow', bool $with_notification = false)

Add user as follower

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
int
add_reference(DocumentIndex|int $document_index_id, int $type = 0, string $level = 'read')

Add Document Reference

add_scope_condition(mixed $condition)

Adds a condition to scope the following find functions

from Model
can_read()

Wrapper of original function

can_read_global($return_hidden = false)

Wrapper of original function

can_see()

Wrapper of original function

can_write()

Wrapper of original function

can_write_global($return_hidden = false)

Wrapper of original function

bool
change_title(mixed $title)

Changes the title of the document index, publishing the change to the related document.

clear_cache()

No description

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
array
convert_array_to_conditions(array $params = array())

Convert Assoc Multidimensional Array to Model Conditional Array

from Model
int
count_all()

Returns the count of all models

from Model
create_job(mixed $status)

creates a new job and stores directly to db

string|void
debug(boolean $show_markers = false, int $mode = 0)

No description

from Model
boolean
delete()

Delete this document index and all jobs associated

int
delete_by_TABLE_COL($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
disable_table_group_id()

Disable the use of the group ID in all queries made

from Model
enable_table_group_id()

Enable the use of the group ID in all queries made

from Model
mixed
find(string $mode = 'all', mixed $conditions = false, mixed $query_params = false)

Find Function to find models using the passed condition

from Model
ModelCollection
find_all_by_id(array $document_index_ids, bool $force_new = false)

Returns a collection document index models or false if not found

find_all_by_id__core($ids)

No description

Model
find_by_TABLE_COL($COL_VALUE, $params = ['order_by'=>'COL1 ASC'])

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

from Model
find_by_id(array $document_index_id, bool $force_new = false)

Returns a collection document index model or false if not found

string
function_name_to_query(string $query, array $parameters)

Converts a find_by_* function name to SQL query.

from Model
get_all_related_documents($document_indices)

No description

get_breadcrumb()

Return Breadcrumb showing the primary location of this element

get_canonical($autogenerate = false)

No description

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

get_canonical_url()

No description

get_children_document()

Get child elements

get_children_group()

Get child elements

string
get_created_at_formatted()

Return a Formatted DateTime

from Model
get_db_properties()

Returns all properties which are available as DB field (= can be used as find_by() properties)

from Model
get_displayname()

Returns the displayname of the user of this document

get_document_registry_info()

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

get_group_security_id()

Get global group_security_id for this document Uses lib->group_security

bool|mixed
get_i18n_property(string $property)

Return the property translated property value if available

from Model
array
get_instance_meta()

Return Meta information for the instance

Core|false
get_instance_obj()

No description

get_instance_string()

No description

get_instance_url()

No description

string
get_model_name()

Returns the SQL table of this model (if available)

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

Returns the SQL table of this model (if available)

from Model
get_parent()

Get a parent element

get_parent_document_index()

Get a parent element

get_parent_group()

Get a parent element

array
get_paths()

Return all potential canonical paths element The upper container where this element resides in could be refered

get_properties(bool $value_discovery = true)

No description

from Model
get_properties_meta(bool|string $field = false)

No description

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

No description

from Model
xm_system_dms_document[]
get_recent_documents()

No description

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

int
get_referenced_from_count(int $type = 0, int $source_instance_id = null)

Returns the number of references

get_references(int $type = 0)

Get all document_index references this document has

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

get_related_document()

Get the original document model

static mixed|null
get_request_cache(string $key)

Return Cache Entry if it exists

from Model
get_root()

No description

string
get_table_name()

Returns the table name of this model.

from Model
string
get_table_primary_key()

No description

from Model
string
get_thumb_url($width = 100, $height = 100, $return_empty = true)

Returns an url to the thumb of this document if available

get_title()

No description

string
get_updated_at_formatted()

Return a Formatted DateTime

from Model
string
get_url()

Returns the goto URL for this specific document

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)

has_related_document()

No description

init(bool $auto_load = true)

Initializes the model

from Model
is_follow_user(int $user_id = null)

Is user a follower ?

bool
is_hidden()

Returns if this document index is marked "hidden"

load()

No description

from Model
bool
load_from_db(string $table_name, array|bool $key_fields = false)

No description

from Model
mark_document_recent($user_id, string $type = 'edit')

No description

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

No description

from Model
static 
prefetch_document_indexes($document_index_ids, $force_new = false)

No description

array
process_find_query(mixed $select_field, mixed $query_params)

Execute Query of find() function. Can be modified by child class if necessary

from Model
reload_schema()

Reloads the schema of the model

from Model
remove_follow_user(int $user_id = null)

Remove user as follower

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

No description

from Model
null
render()

Generic Renderer

reset_related_document()

No description

save()

No description

from Model
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
array
search(string $query, array $field_list, mixed $query_params = false)

Search for passed search query in all passed fields, one match is enough

from Model
set_hidden(bool $include_subtree = false, bool $hidden = true)

Updates the hidden flag for this document index and all children if so desired

set_post_type(int $post_type)

type-safe setter

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

No description

from Model
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.

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
sort_down(int $steps = 1, array $params = array())

Decrease Sort Priority (Increases SORT value)

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

Increase Sort Priority (Decreases SORT value)

from Model
stop_temporary_group_id_overwrite()

Stops the temporary overwrite of the table_group_id

from Model
temporarily_disable_table_group_id()

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

from Model
temporarily_enable_table_group_id()

Temporarily enables 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
unmark_document_recent($user_id)

No description

bool
update_details()

Update the document index with the details from the referenced document 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)

from Model
string|true
validate(array $fieldErrors)

No description

from Model

Details

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

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 119
__construct(int|bool $id = false)

Parameters

int|bool $id Primary ID of the model which should be loaded

Exceptions

ReflectionException

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

Parameters

mixed $var

Return Value

mixed

in Model at line 1570
__isset($name)

Parameters

$name

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

Parameters

mixed $var
mixed $value

Return Value

mixed

at line 1375
__sleep()

in Model at line 1527
null|string __toString()

String Representation of this object (calls for render method)

Return Value

null|string

at line 1383
__wakeup()

in Model at line 998
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

Return Value

xelos_model|false

in Model at line 1240
protected ModelCollection _scope_by(mixed $fn, mixed $parameters)

put your comment there.

..

Parameters

mixed $fn
mixed $parameters

Return Value

ModelCollection

at line 1014
add_follow_user(int|bool $user_id = false, string $status = 'follow', bool $with_notification = false)

Add user as follower

Parameters

int|bool $user_id
string $status ('follow','auto_follow','ignore')
bool $with_notification

Exceptions

Exception

in Model at line 810
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

at line 1084
int add_reference(DocumentIndex|int $document_index_id, int $type = 0, string $level = 'read')

Add Document Reference

Parameters

DocumentIndex|int $document_index_id
int $type Type can be used by the referencing module to distinguish references (e.g. used in system tasks)
string $level possible values are 'read', 'owner', 'share'

Return Value

int reference_id

Exceptions

Exception

in Model at line 1228
add_scope_condition(mixed $condition)

Adds a condition to scope the following find functions

Parameters

mixed $condition

at line 1266
can_read()

Wrapper of original function

at line 1308
can_read_global($return_hidden = false)

Wrapper of original function

Parameters

$return_hidden

at line 1328
can_see()

Wrapper of original function

at line 1344
can_write()

Wrapper of original function

Exceptions

Exception

at line 1355
can_write_global($return_hidden = false)

Wrapper of original function

Parameters

$return_hidden

at line 693
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

Parameters

mixed $title The new title

Return Value

bool TRUE if the change was successfull, FALSE if not

at line 140
clear_cache()

in Model at line 1017
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 486
clear_properties()

in Model at line 1195
array convert_array_to_conditions(array $params = array())

Convert Assoc Multidimensional Array to Model Conditional Array

Parameters

array $params ['id'=>1,'type'=>'active']

Return Value

array ["id = 1","type = 'active'"]

in Model at line 29
int count_all()

Returns the count of all models

Return Value

int

at line 673
create_job(mixed $status)

creates a new job and stores directly to db

Parameters

mixed $status

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

Parameters

boolean $show_markers show markers as well?
int $mode (0 - print, 1 - return, 2 and 3 - Special PopUps)

Return Value

string|void

at line 386
boolean delete()

Delete this document index and all jobs associated

Return Value

boolean was delete successful?

in Model at line 29
int delete_by_TABLE_COL($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

$COL_VALUE

Return Value

int

in Model at line 1480
disable_table_group_id()

Disable the use of the group ID in all queries made

in Model at line 1503
enable_table_group_id()

Enable the use of the group ID in all queries made

in Model at line 1066
mixed find(string $mode = 'all', mixed $conditions = false, mixed $query_params = false)

Find Function to find models using the passed condition

Parameters

string $mode Find mode (all/first/count)
mixed $conditions Conditions passed as field query string (e.g. 'id=1 and name="TEST"') or as parameter array: First Element contains query, 2..n contain Parameters
mixed $query_params Further query parameters (e.g. limit, order_by, request_cache)

Return Value

mixed by_mode [ ALL: ModelCollection; FIRST: Model | boolean false on fail ]

at line 100
ModelCollection find_all_by_id(array $document_index_ids, bool $force_new = false)

Returns a collection document index models or false if not found

Parameters

array $document_index_ids / int $document_index_ids
bool $force_new if true don't get the model from the cache

Return Value

ModelCollection

at line 61
find_all_by_id__core($ids)

Parameters

$ids

in Model at line 29
Model find_by_TABLE_COL($COL_VALUE, $params = ['order_by'=>'COL1 ASC'])

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

Parameters

$COL_VALUE
$params

Return Value

Model

at line 133
DocumentIndex find_by_id(array $document_index_id, bool $force_new = false)

Returns a collection document index model or false if not found

Parameters

array $document_index_id / int $document_index_ids
bool $force_new if true don't get the model from the cache

Return Value

DocumentIndex

in Model at line 1275
string function_name_to_query(string $query, array $parameters)

Converts a find_by_* function name to SQL query.

Parameters

string $query
array $parameters

Return Value

string Returns the where condition

Parameters

$document_indices

at line 264
Breadcrumb get_breadcrumb()

Return Breadcrumb showing the primary location of this element

Return Value

Breadcrumb

at line 144
get_canonical($autogenerate = false)

Parameters

$autogenerate

at line 253
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 151
get_canonical_url()

at line 643
ModelCollection get_children_document()

Get child elements

Return Value

ModelCollection

at line 651
ModelCollection get_children_group()

Get child elements

Return Value

ModelCollection

in Model at line 1462
string get_created_at_formatted()

Return a Formatted DateTime

Return Value

string

in Model at line 404
get_db_properties()

Returns all properties which are available as DB field (= can be used as find_by() properties)

at line 370
get_displayname()

Returns the displayname of the user of this document

at line 563
DocumentRegistry|bool 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|bool

at line 227
get_group_security_id()

Get global group_security_id for this document Uses lib->group_security

in Model at line 1610
bool|mixed get_i18n_property(string $property)

Return the property translated property value if available

Parameters

string $property e.g. title_i18n

Return Value

bool|mixed

at line 243
array get_instance_meta()

Return Meta information for the instance

Return Value

array = ['title'=>"TITLE",'type'=>"module",'module_name'=>'MODULE','instance_id'=>'...']

at line 521
Core|false get_instance_obj()

Return Value

Core|false

at line 231
get_instance_string()

at line 323
get_instance_url()

in Model at line 278
string get_model_name()

Returns the SQL table of this model (if available)

Return Value

string Full qualified table name e.g. xmi_crm01_contact

in Model at line 257
string|bool get_model_table_name(string|bool $table_name = false)

Returns the SQL table of this model (if available)

Parameters

string|bool $table_name Simple table without instance or system prefix

Return Value

string|bool Full qualified table name e.g. xmi_crm01_contact

at line 599
DocumentIndex get_parent()

Get a parent element

Return Value

DocumentIndex

at line 627
DocumentIndex get_parent_document_index()

Get a parent element

Return Value

DocumentIndex

at line 612
DocumentIndex get_parent_group()

Get a parent element

Return Value

DocumentIndex

at line 488
array get_paths()

Return all potential canonical paths element The upper container where this element resides in could be refered

Return Value

array e.g. ['/a/','/a/b/','/a/b/c/']

at line 504
DocumentIndexReference[]|ModelCollection get_possible_rights_context()

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

Parameters

bool $value_discovery Retrieve all values by get_property access method

in Model at line 393
get_properties_meta(bool|string $field = false)

Parameters

bool|string $field if given returns the meta for that field

in Model at line 347
get_property(string $property_id, bool $get_raw_value = false)

Parameters

string $property_id Marker ID
bool $get_raw_value deactivate Marker-Function gets triggered

at line 159
xm_system_dms_document[] get_recent_documents()

Return Value

xm_system_dms_document[]

at line 1134
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

Parameters

int $type (-1 for all references regardless of type)
int $source_instance_id Filter references from given instance id
DocumentIndex $source_document_index

Return Value

DocumentIndex[]|ModelCollection

Exceptions

Exception

at line 1215
int get_referenced_from_count(int $type = 0, int $source_instance_id = null)

Returns the number of references

Parameters

int $type
int $source_instance_id Filter references from given instance id

Return Value

int

Exceptions

Exception

at line 1110
DocumentIndex[]|ModelCollection get_references(int $type = 0)

Get all document_index references this document has

Parameters

int $type set to -1 for all refs regardless of type

Return Value

DocumentIndex[]|ModelCollection

at line 1175
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

Parameters

int $type (-1 for all references regardless of type)
int $source_instance_id Filter references from given instance id
DocumentIndex $source_document_index

Return Value

DocumentIndexReference[]|ModelCollection

Exceptions

Exception

Get the original document model

Return Value

DocumentModel

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

Return Cache Entry if it exists

Parameters

string $key Cache Key

Return Value

mixed|null

at line 587
get_root()

in Model at line 140
string get_table_name()

Returns the table name of this model.

Return Value

string

in Model at line 270
string get_table_primary_key()

Return Value

string Primary Key Field in DB

at line 660
string get_thumb_url($width = 100, $height = 100, $return_empty = true)

Returns an url to the thumb of this document if available

Parameters

$width
$height
$return_empty

Return Value

string

at line 354
get_title()

in Model at line 1471
string get_updated_at_formatted()

Return a Formatted DateTime

Return Value

string

at line 319
string get_url()

Returns the goto URL for this specific document

Return Value

string

at line 1255
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)

Parameters

DocumentIndexReference $reference
int $event_user_id The user (if known to the event) who deleted or triggered the delete

Return Value

void

in Model at line 175
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

at line 1055
Follows[]|ModelCollection|false is_follow_user(int $user_id = null)

Is user a follower ?

Parameters

int $user_id

Return Value

Follows[]|ModelCollection|false follows info ordered from specific to parent or false

at line 1277
bool is_hidden()

Returns if this document index is marked "hidden"

Return Value

bool

in Model at line 311
load()

in Model at line 594
protected bool load_from_db(string $table_name, array|bool $key_fields = false)

Parameters

string $table_name Table Name
array|bool $key_fields Key fields which should be used as WHERE condition

Return Value

bool

at line 185
mark_document_recent($user_id, string $type = 'edit')

Parameters

$user_id
string $type

Exceptions

Exception

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

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|array empty array if none found and compatibility-mode on (xelos model_version < 1)

at line 66
static prefetch_document_indexes($document_index_ids, $force_new = false)

Parameters

$document_index_ids
$force_new

in Model at line 1213
protected array process_find_query(mixed $select_field, mixed $query_params)

Execute Query of find() function. Can be modified by child class if necessary

Parameters

mixed $select_field
mixed $query_params

Return Value

array dbquery Result

in Model at line 147
reload_schema()

Reloads the schema of the model

at line 1040
remove_follow_user(int $user_id = null)

Remove user as follower

Parameters

int $user_id

Exceptions

Exception

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

Parameters

string $table_name Table Name
array $key_fields Key fields which should be used as WHERE condition

Return Value

bool

at line 1368
null render()

Generic Renderer

Return Value

null

in Model at line 288
save()

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

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 1255
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

Search for passed search query in all passed fields, one match is enough

Parameters

string $query
array $field_list
mixed $query_params

Return Value

array

at line 1289
set_hidden(bool $include_subtree = false, bool $hidden = true)

Updates the hidden flag for this document index and all children if so desired

Parameters

bool $include_subtree Shall all children be set to the same value?
bool $hidden Defines the value of the flag (hidden TRUE or FALSE)

Exceptions

Exception

at line 363
set_post_type(int $post_type)

type-safe setter

Parameters

int $post_type

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

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 425
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.

Parameters

string|array $property_id Marker ID (Can also be an Array)
string|bool $property_value Value
bool $no_change Value return void

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

Sets parameter that will be passed to the XUI helpers

Parameters

mixed $params

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

Set Request Cache Entry

Parameters

string $key
mixed $value

in Model at line 713
sort_down(int $steps = 1, array $params = array())

Decrease Sort Priority (Increases SORT value)

Parameters

int $steps
array $params (e.g. filter, order_by)

in Model at line 703
sort_up(int $steps = 1, array $params = array())

Increase Sort Priority (Decreases SORT value)

Parameters

int $steps
array $params (e.g. filter, order_by)

in Model at line 1519
stop_temporary_group_id_overwrite()

Stops the temporary overwrite of the table_group_id

in Model at line 1494
temporarily_disable_table_group_id()

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

in Model at line 1511
temporarily_enable_table_group_id()

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

in Model at line 1434
string to_json()

Returns the model as JSON array

Return Value

string Returns model string

in Model at line 1445
string to_string()

Returns the model as STRING

Return Value

string Returns model as string

in Model at line 1387
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

at line 213
unmark_document_recent($user_id)

Parameters

$user_id

at line 730
bool update_details()

Update the document index with the details from the referenced document model

Return Value

bool

in Model at line 727
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

in Model at line 920
string|true validate(array $fieldErrors)

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