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

Наследование: implements Frontend\Modules\Tags\Engine\TagsInterface
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
get ( string $url ) : array Fetch a question
getAllForCategory ( integer $categoryId, integer $limit = null, mixed $excludeIds = null ) : array Get all items in a category
getCategories ( ) : array Get all categories
getCategory ( string $url ) : array Get a category
getCategoryById ( integer $id ) : array Get a category by id
getFaqsForCategory ( integer $id ) : array Get the all questions for selected category
getForTags ( array $ids ) : array Fetch the list of tags for a list of items
getIdForTags ( Url $url ) : integer Get the id of an item by the full URL of the current page.
getMostRead ( integer $limit ) : array Get all items in a category
getRelated ( integer $id, integer $limit = 5 ) : array Get related items based on tags
increaseViewCount ( integer $id ) : array Increase the number of views for this item
saveFeedback ( array $feedback ) Saves the feedback
search ( array $ids ) : array Parse the search results for this module
updateFeedback ( integer $id, boolean $useful, mixed $previousFeedback = null ) : array Increase the number of views for this item

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

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

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

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

Get all items in a category
public static getAllForCategory ( integer $categoryId, integer $limit = null, mixed $excludeIds = null ) : array
$categoryId integer
$limit integer
$excludeIds mixed
Результат array

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

Get all categories
public static getCategories ( ) : array
Результат array

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

Get a category
public static getCategory ( string $url ) : array
$url string
Результат array

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

Get a category by id
public static getCategoryById ( integer $id ) : array
$id integer
Результат array

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

Get the all questions for selected category
public static getFaqsForCategory ( integer $id ) : array
$id integer
Результат array

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

Fetch the list of tags for a list of items
public static getForTags ( array $ids ) : array
$ids array
Результат array

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

Selects the proper part of the full URL to get the item's id from the database.
public static getIdForTags ( Url $url ) : integer
$url Frontend\Core\Engine\Url
Результат integer

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

Get all items in a category
public static getMostRead ( integer $limit ) : array
$limit integer
Результат array

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

Get related items based on tags
public static getRelated ( integer $id, integer $limit = 5 ) : array
$id integer
$limit integer
Результат array

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

Increase the number of views for this item
public static increaseViewCount ( integer $id ) : array
$id integer
Результат array

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

Saves the feedback
public static saveFeedback ( array $feedback )
$feedback array

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

Increase the number of views for this item
public static updateFeedback ( integer $id, boolean $useful, mixed $previousFeedback = null ) : array
$id integer
$useful boolean
$previousFeedback mixed
Результат array