class UvwdocsModelcategory extends JModelAdmin


Located at : UKNOWVA_ROOT/components/com_uvwdocs/models/category.php

Uvwdocs model.

Properties

$_errormsg

Methods

__construct(array $config = array())

Constructor.

string
__toString()

Magic method to convert the object to a string gracefully.

from JObject
mixed
def(string $property, mixed $default = null)

Sets a default value if not alreay assigned

from JObject
mixed
get(string $property, mixed $default = null)

Returns a property of the object or the default value if the property is not set.

from JObject
array
getProperties(boolean $public = true)

Returns an associative array of object properties.

from JObject
string
getError(integer $i = null, boolean $toString = true)

Get the most recent error message.

from JObject
array
getErrors()

Return all errors, if any.

from JObject
mixed
set(string $property, mixed $value = null)

Modifies a property of the object, creating it if it does not already exist.

from JObject
boolean
setProperties(mixed $properties)

Set the object properties based on a named array/hash.

from JObject
void
setError(string $error)

Add an error message.

from JObject
string
toString() deprecated

No description

from JObject
static array
addIncludePath(mixed $path = '', string $prefix = '')

Add a directory where JModel should search for models. You may either pass a string or an array of directories.

from JModel
static void
addTablePath(mixed $path)

Adds to the stack of model table paths in LIFO order.

from JModel
static mixed
getInstance(string $type, string $prefix = '', array $config = array())

Returns a Model object, always creating it

from JModel
getDbo()

Method to get the database connector object

from JModel
string
getName()

Method to get the model name

from JModel
object
getState(string $property = null, mixed $default = null)

Method to get model state variables

from JModel
getTable($type = 'Category', string $prefix = 'UvwdocsTable', $config = array())

Method to get a table object, load it if necessary.

void
setDbo(object $db)

Method to set the database connector object

from JModel
mixed
setState(string $property, mixed $value = null)

Method to set model state variables

from JModel
boolean
checkin(mixed $pks = array())

Method override to check-in a record or an array of record

boolean
checkout(integer $pk = null)

Method override to check-out a record.

mixed
getForm(array $data = array(), boolean $loadData = true)

Method to get the record form.

mixed
validate(object $form, array $data, string $group = null)

Method to validate the form data.

boolean
batch(array $commands, array $pks)

Method to perform batch operations on an item or a set of items.

boolean
delete(array $pks)

Method to delete one or more records.

mixed
getItem(integer $pk = null)

Method to get a single record.

boolean
publish(array $pks, integer $value = 1)

Method to change the published state of one or more records.

mixed
reorder(integer $pks, integer $delta)

Method to adjust the ordering of a row.

boolean
save(array $data, bool $returnObject = false)

Method to save the form data.

mixed
saveorder(array $pks = null, integer $order = null)

Saves the manually set order of records.

store($data)

Returns a reference to the a Table object, always creating it.

getData(number $cat_id, string $include_breadcrumb = false)

this will also give breadcrumb if true

the
getFolderBreadcrumb(number $cat_id, array $bread_crumb = array())

gets the folder bread crumb

mixed|NULL|unknown[]|mixed[]
getSubFolders(int|mixed $cat_id = null)

gets the sub folders

boolean
checkFolderName(string $title, number $catid, int $id = Null, number $publish = 1)

checks folder name

moveFolder(string $id, string $from, string $to)

moves the folder

boolean|string
restoreFolder($id, $returnmsg = true)

restores the folder

boolean|string
deleteFolder(strings $id, string $returnmsg = true)

deletes a folder

boolean|string
permanentlyDeleteFolder(string|int $id, string $returnmsg = true)

permanently deletes a folder

NULL|string[][]|NULL[][]|The[][]|mixed[][]|unknown[][]
getUsersList(int|array $ids = Null, string $q = Null, string $onlyids = true, string $includeme = false, number $limit, array $exclude = array(), array $include_groups = array(), array $exclude_groups = array(), array $include = array())

gets users list

boolean
hasAccessToFolder(int $id, int $userid, string $type = 'view')

checks if particular user has access to folder

boolean
hasEditAccessToFolder(int $id, int $userid)

checks if particular user has edit access to folder

boolean
hasDeleteAccessToFolder(int $id, unknown $userid)

checks if particular user has delete access to folder

boolean
hasUploadAccessToFolder(int $id, int $userid)

checks if a particular user has upload access to the folder

boolean
addLog(int $id, string $log, string $time_stamp = null)

adding a log

mixed|NULL|unknown[]|mixed[]
getLog(int $id)

get the saved log

getFolderSelectList($first_row = array('id' => '', 'value' => 'Select All'), $selected = null, $name = 'cat_id', $attributes = 'class="inputbox uselect"', $orderby = 'title')

same as UvwdocsHelper::getFolderSelectList() function

getCreatedBySelectList($first_row = array('id' => '', 'value' => 'Select All'), $selected = null, $name = 'created_by', $attributes = 'class="inputbox uselect"', $orderby = 'name')

same as getCreatedBySelectList()

boolean
setUpCron(int $id)

set up the cron

Details

in JModelAdmin at line 81
JObject __construct(array $config = array())

Constructor.

Parameters

array $config An array of configuration options (name, state, dbo, tablepath, ignorerequest).

Return Value

JObject

See also

JController

in JObject at line 56
string __toString()

Magic method to convert the object to a string gracefully.

Return Value

string The classname.

in JObject at line 70
mixed def(string $property, mixed $default = null)

Sets a default value if not alreay assigned

Parameters

string $property The name of the property.
mixed $default The default value.

Return Value

mixed

in JObject at line 88
mixed get(string $property, mixed $default = null)

Returns a property of the object or the default value if the property is not set.

Parameters

string $property The name of the property.
mixed $default The default value.

Return Value

mixed The value of the property.

See also

getProperties()

in JObject at line 107
array getProperties(boolean $public = true)

Returns an associative array of object properties.

Parameters

boolean $public If true, returns only the public properties.

Return Value

array

See also

get()

in JObject at line 133
string getError(integer $i = null, boolean $toString = true)

Get the most recent error message.

Parameters

integer $i Option error index.
boolean $toString Indicates if JError objects should return their error message.

Return Value

string Error message

in JObject at line 165
array getErrors()

Return all errors, if any.

Return Value

array Array of error messages or JErrors.

in JObject at line 180
mixed set(string $property, mixed $value = null)

Modifies a property of the object, creating it if it does not already exist.

Parameters

string $property The name of the property.
mixed $value The value of the property to set.

Return Value

mixed Previous value of the property.

in JObject at line 198
boolean setProperties(mixed $properties)

Set the object properties based on a named array/hash.

Parameters

mixed $properties Either an associative array or another object.

Return Value

boolean

See also

set()

in JObject at line 222
void setError(string $error)

Add an error message.

Parameters

string $error Error message.

Return Value

void

in JObject at line 235
string toString() deprecated

deprecated 12.1 Use magic method __toString()

Return Value

string

See also

__toString()

in JModel at line 84
static array addIncludePath(mixed $path = '', string $prefix = '')

Add a directory where JModel should search for models. You may either pass a string or an array of directories.

Parameters

mixed $path A path or array[sting] of paths to search.
string $prefix A prefix for models.

Return Value

array An array with directory elements. If prefix is equal to '', all directories are returned.

in JModel at line 123
static void addTablePath(mixed $path)

Adds to the stack of model table paths in LIFO order.

Parameters

mixed $path The directory as a string or directories as an array to add.

Return Value

void

in JModel at line 161
static mixed getInstance(string $type, string $prefix = '', array $config = array())

Returns a Model object, always creating it

Parameters

string $type The model type to instantiate
string $prefix Prefix for the model class name. Optional.
array $config Configuration array for model. Optional.

Return Value

mixed A model object or false on failure

in JModel at line 327
JDatabase getDbo()

Method to get the database connector object

Return Value

JDatabase JDatabase connector object

in JModel at line 341
string getName()

Method to get the model name

The model name. By default parsed using the classname or it can be set by passing a $config['name'] in the class constructor

Return Value

string The name of the model

in JModel at line 365
object getState(string $property = null, mixed $default = null)

Method to get model state variables

Parameters

string $property Optional parameter name
mixed $default Optional default value

Return Value

object The property where specified, the state object where omitted

at line 244
JTable getTable($type = 'Category', string $prefix = 'UvwdocsTable', $config = array())

Method to get a table object, load it if necessary.

Parameters

$type
string $prefix The class prefix. Optional.
$config

Return Value

JTable A JTable object

See also

JModel::getTable()

in JModel at line 427
void setDbo(object $db)

Method to set the database connector object

Parameters

object $db &$db A JDatabase based object

Return Value

void

in JModel at line 441
mixed setState(string $property, mixed $value = null)

Method to set model state variables

Parameters

string $property The name of the property.
mixed $value The value of the property to set or null.

Return Value

mixed The previous value of the property or null if not set.

in JModelAdmin at line 520
boolean checkin(mixed $pks = array())

Method override to check-in a record or an array of record

Parameters

mixed $pks The ID of the primary key or an array of IDs

Return Value

boolean False on failure or error, true otherwise.

in JModelAdmin at line 562
boolean checkout(integer $pk = null)

Method override to check-out a record.

Parameters

integer $pk The numeric id of the primary key.

Return Value

boolean False on failure or error, true otherwise.

at line 258
mixed getForm(array $data = array(), boolean $loadData = true)

Method to get the record form.

Parameters

array $data Data for the form.
boolean $loadData True if the form is to load its own data (default case), false if not.

Return Value

mixed A JForm object on success, false on failure

in JModelForm at line 240
mixed validate(object $form, array $data, string $group = null)

Method to validate the form data.

Parameters

object $form The form to validate against.
array $data The data to validate.
string $group The name of the field group to validate.

Return Value

mixed Array of filtered data if valid, false otherwise.

See also

JFormRule
JFilterInput

in JModelAdmin at line 132
boolean batch(array $commands, array $pks)

Method to perform batch operations on an item or a set of items.

Parameters

array $commands An array of commands to perform.
array $pks An array of item ids.

Return Value

boolean Returns true on success, false on failure.

in JModelAdmin at line 578
boolean delete(array $pks)

Method to delete one or more records.

Parameters

array $pks An array of record primary keys.

Return Value

boolean True if successful, false if an error occurs.

at line 300
mixed getItem(integer $pk = null)

Method to get a single record.

Parameters

integer $pk The id of the primary key.

Return Value

mixed Object on success, false on failure.

in JModelAdmin at line 766
boolean publish(array $pks, integer $value = 1)

Method to change the published state of one or more records.

Parameters

array $pks A list of the primary keys to change.
integer $value The value of the published state.

Return Value

boolean True on success.

in JModelAdmin at line 825
mixed reorder(integer $pks, integer $delta)

Method to adjust the ordering of a row.

Returns NULL if the user did not have edit privileges for any of the selected primary keys.

Parameters

integer $pks The ID of the primary key to move.
integer $delta Increment, usually +1 or -1

Return Value

mixed False on failure or error, true on success, null if the $pk is empty (no items selected).

in JModelAdmin at line 887
boolean save(array $data, bool $returnObject = false)

Method to save the form data.

Parameters

array $data The form data.
bool $returnObject If set to true, then the table object shall be returned, this was added in 2.5.1 onwards

Return Value

boolean True on success, False on error.

in JModelAdmin at line 969
mixed saveorder(array $pks = null, integer $order = null)

Saves the manually set order of records.

Parameters

array $pks An array of primary key ids.
integer $order +1 or -1

Return Value

mixed

at line 39
JTable store($data)

Returns a reference to the a Table object, always creating it.

Parameters

$data

Return Value

JTable A database object

at line 314
JTable getData(number $cat_id, string $include_breadcrumb = false)

this will also give breadcrumb if true

Parameters

number $cat_id category id
string $include_breadcrumb this will also give breadcrumb if true

Return Value

JTable

at line 340
the getFolderBreadcrumb(number $cat_id, array $bread_crumb = array())

gets the folder bread crumb

Parameters

number $cat_id folder id
array $bread_crumb pass array of folder to be in breadcrumb or else gets it automatically

Return Value

the folder in breadcrumb

at line 381
mixed|NULL|unknown[]|mixed[] getSubFolders(int|mixed $cat_id = null)

gets the sub folders

Parameters

int|mixed $cat_id gets the folder id

Return Value

mixed|NULL|unknown[]|mixed[] returns the sub folders

at line 421
boolean checkFolderName(string $title, number $catid, int $id = Null, number $publish = 1)

checks folder name

Parameters

string $title
number $catid folder id, default = 0
int $id
number $publish

Return Value

boolean returns false if the folder exists

at line 441
moveFolder(string $id, string $from, string $to)

moves the folder

Parameters

string $id id of the folder
string $from where to move the folder
string $to 0 is for root, from shall be used when adding to logs

at line 474
boolean|string restoreFolder($id, $returnmsg = true)

restores the folder

Parameters

$id
$returnmsg

Return Value

boolean|string returns successfull from language file as defined or else some error defined in language file

at line 504
boolean|string deleteFolder(strings $id, string $returnmsg = true)

deletes a folder

Parameters

strings $id folder id
string $returnmsg returns the message and not a boolean if $returnmsg=false

Return Value

boolean|string return success as defined in language file or else some error as defined in language

at line 530
boolean|string permanentlyDeleteFolder(string|int $id, string $returnmsg = true)

permanently deletes a folder

Parameters

string|int $id folder id
string $returnmsg returns the message and not a boolean if $returnmsg=false

Return Value

boolean|string returns success from language or else error from language file

at line 599
NULL|string[][]|NULL[][]|The[][]|mixed[][]|unknown[][] getUsersList(int|array $ids = Null, string $q = Null, string $onlyids = true, string $includeme = false, number $limit, array $exclude = array(), array $include_groups = array(), array $exclude_groups = array(), array $include = array())

gets users list

Parameters

int|array $ids default = NULL
string $q query to search in ids
string $onlyids checks only in those query
string $includeme to include yourself or not, default = false
number $limit limits the output
array $exclude an array of users to be not included in this
array $include_groups is the groups that shud be specifically included and
array $exclude_groups is the groups that shud be excluded
array $include an array of users to be included in this

Return Value

NULL|string[][]|NULL[][]|The[][]|mixed[][]|unknown[][]

at line 681
boolean hasAccessToFolder(int $id, int $userid, string $type = 'view')

checks if particular user has access to folder

Parameters

int $id folder id
int $userid user id
string $type can be view,edit,upload,delete view access

Return Value

boolean returns true if have access or else false

at line 755
boolean hasEditAccessToFolder(int $id, int $userid)

checks if particular user has edit access to folder

Parameters

int $id folder id
int $userid user id

Return Value

boolean returns true if have edit access or else false

at line 767
boolean hasDeleteAccessToFolder(int $id, unknown $userid)

checks if particular user has delete access to folder

Parameters

int $id folder id
unknown $userid user id

Return Value

boolean returns tru if have delete access or else false

at line 779
boolean hasUploadAccessToFolder(int $id, int $userid)

checks if a particular user has upload access to the folder

Parameters

int $id folder id
int $userid user id

Return Value

boolean returns true if have upload access or else false

at line 789
boolean addLog(int $id, string $log, string $time_stamp = null)

adding a log

Parameters

int $id corresponding unique id for the file
string $log about the log
string $time_stamp gets current time automatically

Return Value

boolean returns true if succeed in saving log or else false

at line 827
mixed|NULL|unknown[]|mixed[] getLog(int $id)

get the saved log

Parameters

int $id id to get the data

Return Value

mixed|NULL|unknown[]|mixed[] returns the log of the give id

at line 837
getFolderSelectList($first_row = array('id' => '', 'value' => 'Select All'), $selected = null, $name = 'cat_id', $attributes = 'class="inputbox uselect"', $orderby = 'title')

same as UvwdocsHelper::getFolderSelectList() function

Parameters

$first_row
$selected
$name
$attributes
$orderby

at line 844
getCreatedBySelectList($first_row = array('id' => '', 'value' => 'Select All'), $selected = null, $name = 'created_by', $attributes = 'class="inputbox uselect"', $orderby = 'name')

same as getCreatedBySelectList()

Parameters

$first_row
$selected
$name
$attributes
$orderby

at line 853
boolean setUpCron(int $id)

set up the cron

Parameters

int $id id is the file id, but if type==folder then id is cat_id

Return Value

boolean false if failed