PHP Класс Backend\Modules\Faq\Engine\Model

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
delete ( integer $id ) Delete a question
deleteCategory ( integer $id ) Delete a specific category
deleteCategoryAllowed ( integer $id ) : boolean Is the deletion of a category allowed?
deleteFeedback ( integer $itemId ) Delete the feedback
exists ( integer $id ) : boolean Does the question exist?
existsCategory ( integer $id ) : boolean Does the category exist?
get ( integer $id ) : array Fetch a question
getAllFeedback ( integer $limit = 5 ) : array Fetches all the feedback that is available
getAllFeedbackForQuestion ( integer $id ) : array Fetches all the feedback for a question
getByTag ( integer $tagId ) : array Get all items by a given tag id
getCategories ( boolean $includeCount = false ) : array Get all the categories
getCategory ( integer $id ) : array Fetch a category
getCategoryCount ( ) : integer Fetch the category count
getFeedback ( integer $id ) : array Fetch the feedback item
getMaximumCategorySequence ( ) : integer Get the maximum sequence for a category
getMaximumSequence ( integer $id ) : integer Get the max sequence id for a category
getURL ( string $url, integer $id = null ) : string Retrieve the unique URL for an item
getURLForCategory ( string $url, integer $id = null ) : string Retrieve the unique URL for a category
insert ( array $item ) : integer Insert a question in the database
insertCategory ( array $item, array $meta = null ) : integer Insert a category in the database
update ( array $item ) Update a certain question
updateCategory ( array $item ) Update a certain category

Описание методов

delete() публичный статический Метод

Delete a question
public static delete ( integer $id )
$id integer

deleteCategory() публичный статический Метод

Delete a specific category
public static deleteCategory ( integer $id )
$id integer

deleteCategoryAllowed() публичный статический Метод

Is the deletion of a category allowed?
public static deleteCategoryAllowed ( integer $id ) : boolean
$id integer
Результат boolean

deleteFeedback() публичный статический Метод

Delete the feedback
public static deleteFeedback ( integer $itemId )
$itemId integer

exists() публичный статический Метод

Does the question exist?
public static exists ( integer $id ) : boolean
$id integer
Результат boolean

existsCategory() публичный статический Метод

Does the category exist?
public static existsCategory ( integer $id ) : boolean
$id integer
Результат boolean

get() публичный статический Метод

Fetch a question
public static get ( integer $id ) : array
$id integer
Результат array

getAllFeedback() публичный статический Метод

Fetches all the feedback that is available
public static getAllFeedback ( integer $limit = 5 ) : array
$limit integer
Результат array

getAllFeedbackForQuestion() публичный статический Метод

Fetches all the feedback for a question
public static getAllFeedbackForQuestion ( integer $id ) : array
$id integer The question id.
Результат array

getByTag() публичный статический Метод

Get all items by a given tag id
public static getByTag ( integer $tagId ) : array
$tagId integer
Результат array

getCategories() публичный статический Метод

Get all the categories
public static getCategories ( boolean $includeCount = false ) : array
$includeCount boolean
Результат array

getCategory() публичный статический Метод

Fetch a category
public static getCategory ( integer $id ) : array
$id integer
Результат array

getCategoryCount() публичный статический Метод

Fetch the category count
public static getCategoryCount ( ) : integer
Результат integer

getFeedback() публичный статический Метод

Fetch the feedback item
public static getFeedback ( integer $id ) : array
$id integer
Результат array

getMaximumCategorySequence() публичный статический Метод

Get the maximum sequence for a category
public static getMaximumCategorySequence ( ) : integer
Результат integer

getMaximumSequence() публичный статический Метод

Get the max sequence id for a category
public static getMaximumSequence ( integer $id ) : integer
$id integer The category id.
Результат integer

getURL() публичный статический Метод

Retrieve the unique URL for an item
public static getURL ( string $url, integer $id = null ) : string
$url string
$id integer The id of the item to ignore.
Результат string

getURLForCategory() публичный статический Метод

Retrieve the unique URL for a category
public static getURLForCategory ( string $url, integer $id = null ) : string
$url string
$id integer The id of the category to ignore.
Результат string

insert() публичный статический Метод

Insert a question in the database
public static insert ( array $item ) : integer
$item array
Результат integer

insertCategory() публичный статический Метод

Insert a category in the database
public static insertCategory ( array $item, array $meta = null ) : integer
$item array
$meta array The metadata for the category to insert.
Результат integer

update() публичный статический Метод

Update a certain question
public static update ( array $item )
$item array

updateCategory() публичный статический Метод

Update a certain category
public static updateCategory ( array $item )
$item array