PHP Class Frontend\Modules\Faq\Engine\Model

Inheritance: implements Frontend\Modules\Tags\Engine\TagsInterface
Datei anzeigen Open project: forkcms/forkcms Class Usage Examples

Public Methods

Method Description
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

Method Details

get() public static method

Fetch a question
public static get ( string $url ) : array
$url string
return array

getAllForCategory() public static method

Get all items in a category
public static getAllForCategory ( integer $categoryId, integer $limit = null, mixed $excludeIds = null ) : array
$categoryId integer
$limit integer
$excludeIds mixed
return array

getCategories() public static method

Get all categories
public static getCategories ( ) : array
return array

getCategory() public static method

Get a category
public static getCategory ( string $url ) : array
$url string
return array

getCategoryById() public static method

Get a category by id
public static getCategoryById ( integer $id ) : array
$id integer
return array

getFaqsForCategory() public static method

Get the all questions for selected category
public static getFaqsForCategory ( integer $id ) : array
$id integer
return array

getForTags() public static method

Fetch the list of tags for a list of items
public static getForTags ( array $ids ) : array
$ids array
return array

getIdForTags() public static method

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
return integer

getMostRead() public static method

Get all items in a category
public static getMostRead ( integer $limit ) : array
$limit integer
return array

getRelated() public static method

Get related items based on tags
public static getRelated ( integer $id, integer $limit = 5 ) : array
$id integer
$limit integer
return array

increaseViewCount() public static method

Increase the number of views for this item
public static increaseViewCount ( integer $id ) : array
$id integer
return array

saveFeedback() public static method

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

updateFeedback() public static method

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
return array