KnowledgeBase_KnowledgeBase_Model
extends Base
in package
Class tree model for module knowledge base.
Table of Contents
- $value : array<string|int, mixed>
- __construct() : mixed
- Constructor.
- get() : mixed
- Function to get the value for a given key.
- getArray() : array<string|int, mixed>
- Function to get the array values for a given key.
- getCategories() : array<string|int, mixed>
- Get folders.
- getCategoriesByParent() : void
- Get categories by arent.
- getData() : void
- Get data form ajax.
- getFeaturedRecords() : array<string|int, mixed>
- Get featured records.
- getForHtml() : mixed
- Function to get the html encoded value for a given key.
- getForSql() : mixed
- Function to get the value if its safe to use for SQL Query (column).
- getInstance() : self
- Get instance.
- getKeys() : array<string|int, string>
- Function to get keys.
- getListQuery() : Query
- Get record list query.
- getRecordsByParentCategory() : array<string|int, mixed>
- Get records by parent category.
- getTemplate() : array<string|int, mixed>
- Get template.
- getTreeField() : array<string|int, mixed>
- Get tree field.
- has() : bool
- Function to check if the key exists.
- isEmpty() : bool
- Function to check if the key is empty.
- parseForDisplay() : array<string|int, mixed>
- Parse record list for display.
- remove() : mixed
- Function to remove the value.
- search() : array<string|int, mixed>
- Article search.
- set() : $this
- Function to set the value for a given key.
- setData() : $this
- Function to set all the values.
Properties
$value
protected
array<string|int, mixed>
$value
Values
Methods
__construct()
Constructor.
public
__construct([array<string|int, mixed> $values = [] ]) : mixed
Parameters
- $values : array<string|int, mixed> = []
Return values
mixed —get()
Function to get the value for a given key.
public
get(string $key) : mixed
Parameters
- $key : string
Return values
mixed —Value for the given key
getArray()
Function to get the array values for a given key.
public
getArray(string $key[, array<string|int, mixed> $value = [] ]) : array<string|int, mixed>
Parameters
- $key : string
- $value : array<string|int, mixed> = []
Return values
array<string|int, mixed> —getCategories()
Get folders.
public
getCategories() : array<string|int, mixed>
Return values
array<string|int, mixed> —getCategoriesByParent()
Get categories by arent.
public
getCategoriesByParent() : void
Return values
void —getData()
Get data form ajax.
public
getData() : void
Return values
void —getFeaturedRecords()
Get featured records.
public
getFeaturedRecords(array<string|int, string> $categories) : array<string|int, mixed>
Parameters
- $categories : array<string|int, string>
Return values
array<string|int, mixed> —getForHtml()
Function to get the html encoded value for a given key.
public
getForHtml(string $key) : mixed
Parameters
- $key : string
Return values
mixed —getForSql()
Function to get the value if its safe to use for SQL Query (column).
public
getForSql(string $key[, bool $skipEmtpy = true ]) : mixed
Parameters
- $key : string
- $skipEmtpy : bool = true
-
Skip the check if string is empty
Return values
mixed —Value for the given key
getInstance()
Get instance.
public
static getInstance(string $moduleName) : self
Parameters
- $moduleName : string
Return values
self —getKeys()
Function to get keys.
public
getKeys() : array<string|int, string>
Return values
array<string|int, string> —getListQuery()
Get record list query.
public
getListQuery() : Query
Return values
Query —getRecordsByParentCategory()
Get records by parent category.
public
getRecordsByParentCategory() : array<string|int, mixed>
Return values
array<string|int, mixed> —getTemplate()
Get template.
public
getTemplate() : array<string|int, mixed>
Return values
array<string|int, mixed> —getTreeField()
Get tree field.
public
getTreeField() : array<string|int, mixed>
Return values
array<string|int, mixed> —has()
Function to check if the key exists.
public
has(string $key) : bool
Parameters
- $key : string
Return values
bool —isEmpty()
Function to check if the key is empty.
public
isEmpty(string $key) : bool
Parameters
- $key : string
Return values
bool —parseForDisplay()
Parse record list for display.
public
parseForDisplay(DataReader $dataReader) : array<string|int, mixed>
Parameters
- $dataReader : DataReader
Return values
array<string|int, mixed> —remove()
Function to remove the value.
public
remove(string $key) : mixed
Parameters
- $key : string
Return values
mixed —search()
Article search.
public
search() : array<string|int, mixed>
Return values
array<string|int, mixed> —set()
Function to set the value for a given key.
public
set(string $key, mixed $value) : $this
Parameters
- $key : string
- $value : mixed
Return values
$this —setData()
Function to set all the values.
public
setData(mixed $values) : $this
Parameters
- $values : mixed