class UvwdocsHelper


Located at : UKNOWVA_ROOT/components/com_uvwdocs/helpers/uvwdocs.php

Methods

static 
myFunction()

No description

static mixed|boolean
getFolderList()

Gets Folder list

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

Get folder select list

mixed|NULL|mixed[]
getAllChildFolders(mixed $cat_id, string $merge_self = false, array $children = array())

this function simply returns an array of all the subfolders of a folder, it does not account the currently logged in user returns all the subfolders of a folder

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

gets created by select list

void|mixed|boolean
parseFolderTree(array $node, array $options, number $level)

Parses folder tree

array|mixed
getAllSubFolders(number $cat_id, array $children = array())

get all sub folders

NULL|mixed|NULL|mixed[]
getFilesInFolders(string $cat_id = null)

returns an array of files in the provided folders

mixed|NULL|number|mixed
getUserMaxFileSize()

Gets user max file size

mixed|NULL|unknown|mixed|NULL|mixed[]
getUserFileTypes()

Gets User file types

boolean
isAdmin(int $userid = null)

check if admin or not

boolean
isAdminUser(int $userid = null)

checks if admin or not

boolean|unknown
isFrontEndPublicAccessAllowed(string $task = Null)

checks if the view is allowed for public access

string
getRootPath()

gets the root path

string
getVersionsPath()

get the version of the uknowva

string
getIconFolder(string $path = false)

gets the path of uknowva icon folder

string
getIconFolderPath()

Gets icon folder path

string
getSizeText(int|mixed $size, string $format = 'auto')

converts the size into text calls ConvHelper::getSizeText() function

gets
getUserDetails(int $userid)

gets user details

array|mixed
getCronLimit()

gets cron limit

string
getPublicDownloadLimit()

get public download limit

mixed|string
getComponentItemId(string $url = 'com_uvwdocs', string $default = 'com_uvwdocs')

gets component ID

string
generateDownloadToken(number $max_size = 100)

generates the download token if you change max size to more than 500, then make sure to do the same in the database as well

string
encode_string(String $str)

encode the string use base64 encoder of encoding string

string
decode_string(string $str)

decodes the string using base64 decoder

getSecretKey()

gets your uknowva instance secret key

mixed|string
getUploadMaxFileSize()

Get upload max file size

string
getAllowedFilesRegEx(array $allowed = null)

Get allowed files regex if a comma separated listispassed here, then the regex of that shall be calculated

boolean
isDDLAllowed()

checks ifs direct download link / Email file option available

boolean
isDocumentVersioningEnabled()

checks if document versioning system enabled

boolean
isLogsEnabled()

checks if the Viewing of logs enabled

Details

at line 11
static myFunction()

at line 20
static mixed|boolean getFolderList()

Gets Folder list

Return Value

mixed|boolean returns HTML select list of folder or else false if failed

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

Get folder select list

Parameters

array $first_row its is the array of the id and value, default = 'Select Value'
string $selected default selected value at start in select list output, default = NULL
string $name name of the select list to be in the output, default = "cat_id"
string $attributes attributes to pass if any
string $orderby order the list to be in

Return Value

mixed|boolean returns the HTML select list or else false if failed

at line 130
mixed|NULL|mixed[] getAllChildFolders(mixed $cat_id, string $merge_self = false, array $children = array())

this function simply returns an array of all the subfolders of a folder, it does not account the currently logged in user returns all the subfolders of a folder

Parameters

mixed $cat_id file id
string $merge_self if merge_self = true, then the array shall have the self id as well
array $children childer of the folder if you know or else it gets it automatically

Return Value

mixed|NULL|mixed[] returns the child folders

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

gets created by select list

Parameters

array $first_row it is the array of id and value, default value = 'Select All'
string $selected selected value to be at the start of the list as default, default = NULL
string $name default = "created _by"
string $attributes attributes to pass any , default = 'class="inputbox uselect"'
string $orderby order the output to be in, default = 'name'

Return Value

mixed|boolean returns the select list with above parameters or else false if failed

at line 208
void|mixed|boolean parseFolderTree(array $node, array $options, number $level)

Parses folder tree

Parameters

array $node array of the children folder
array $options options to pass if any,
number $level limits the output, default = 0

Return Value

void|mixed|boolean returns select list of the tree

at line 235
array|mixed getAllSubFolders(number $cat_id, array $children = array())

get all sub folders

Parameters

number $cat_id file id, default = 0
array $children array of children folder or else gets automatically

Return Value

array|mixed returns the array of sub folders

at line 280
NULL|mixed|NULL|mixed[] getFilesInFolders(string $cat_id = null)

returns an array of files in the provided folders

Parameters

string $cat_id $cat_id can be a single folder id or an array of folder ids

Return Value

NULL|mixed|NULL|mixed[] returns the array of file in the given folder

at line 326
mixed|NULL|number|mixed getUserMaxFileSize()

Gets user max file size

Return Value

mixed|NULL|number|mixed returns the user max file size

at line 358
mixed|NULL|unknown|mixed|NULL|mixed[] getUserFileTypes()

Gets User file types

Return Value

mixed|NULL|unknown|mixed|NULL|mixed[] returns the array of file types

at line 392
boolean isAdmin(int $userid = null)

check if admin or not

Parameters

int $userid user id or else gets current user automatically, default = NULL

Return Value

boolean returns true if is admin or else false

at line 414
boolean isAdminUser(int $userid = null)

checks if admin or not

Parameters

int $userid user id or else gets current user automatically

Return Value

boolean returns true if is admin or else false

at line 424
boolean|unknown isFrontEndPublicAccessAllowed(string $task = Null)

checks if the view is allowed for public access

Parameters

string $task name of the view default = NULL

Return Value

boolean|unknown returns true if allowed or else false

at line 458
string getRootPath()

gets the root path

Return Value

string returns the root path of the uknowva

at line 483
string getVersionsPath()

get the version of the uknowva

Return Value

string return the root version of the uknowva

at line 500
string getIconFolder(string $path = false)

gets the path of uknowva icon folder

Parameters

string $path $path = true then return the physical path, default = false

Return Value

string returns the uknowva icon folder path

at line 511
string getIconFolderPath()

Gets icon folder path

Return Value

string returns the icon folder path

at line 524
string getSizeText(int|mixed $size, string $format = 'auto')

converts the size into text calls ConvHelper::getSizeText() function

Parameters

int|mixed $size size to convert
string $format format to change into eg:- KB,MB,GB

Return Value

string returns the size in int to text string

at line 534
gets getUserDetails(int $userid)

gets user details

Parameters

int $userid user id of the user to get details of

Return Value

gets returns the user details

at line 542
array|mixed getCronLimit()

gets cron limit

Return Value

array|mixed returns the cron limit

at line 554
string getPublicDownloadLimit()

get public download limit

Return Value

string gives the public waiting time limit

at line 570
mixed|string getComponentItemId(string $url = 'com_uvwdocs', string $default = 'com_uvwdocs')

gets component ID

Parameters

string $url url format of the component
string $default = 'com_uvwdocs'

Return Value

mixed|string gives the component id

at line 594
string generateDownloadToken(number $max_size = 100)

generates the download token if you change max size to more than 500, then make sure to do the same in the database as well

Parameters

number $max_size token size

Return Value

string returns the token

at line 610
string encode_string(String $str)

encode the string use base64 encoder of encoding string

Parameters

String $str string to encode

Return Value

string returns encoded string

at line 627
string decode_string(string $str)

decodes the string using base64 decoder

Parameters

string $str string to decode

Return Value

string return the decoded string

at line 643
getSecretKey()

gets your uknowva instance secret key

at line 653
mixed|string getUploadMaxFileSize()

Get upload max file size

Return Value

mixed|string returns the max file size limit to upload

at line 664
string getAllowedFilesRegEx(array $allowed = null)

Get allowed files regex if a comma separated listispassed here, then the regex of that shall be calculated

Parameters

array $allowed to added regex default = NULL

Return Value

string returns the allowed file type regex

at line 677
boolean isDDLAllowed()

checks ifs direct download link / Email file option available

Return Value

boolean returns true if success or else false

at line 686
boolean isDocumentVersioningEnabled()

checks if document versioning system enabled

Return Value

boolean return true if success or else false

at line 695
boolean isLogsEnabled()

checks if the Viewing of logs enabled

Return Value

boolean returns true if success or else false