Overview

The Data_Frontend trait provides methods for handling various frontend data operations, including article retrieval, entity information, event handling, and search functionality.

Article Information

getArticleInfo

Retrieves all information about an article.

return
object|boolean

Returns the article object with additional information or false if the article is not found or not visible.

getItemVisibility

Checks if an item is visible based on its publish date and visibility settings.

return
boolean

Returns true if the item is visible, false otherwise.

Entity Information

getEntityTemplate

Retrieves and formats information for a generic entity.

return
object

Returns the entity object with additional information.

getNormalInfo

Retrieves information for a normal entity type.

return
object

Returns the normal entity object with additional information.

getLocationInfo

Retrieves information for a location entity type.

return
object

Returns the location entity object with additional information.

Event Handling

getFutureEvents

Retrieves all future events of a certain type.

return
array

Returns an array of future event objects, sorted by start date.

getEventsOfCategory

Retrieves all events of a certain category.

return
array

Returns an array of event objects belonging to the specified category.

getFutureEvent

Determines if an event is in the future.

return
object|boolean

Returns the event item if it’s in the future, false otherwise.

General Information

addCategoryInfo

Adds additional information to a category object.

return
object

Returns the category object with additional information.

getColor

Retrieves the hex color code for a given color ID.

return
string

Returns the hex color code.

getGeneralTags

Retrieves general tags based on a tag relation array.

return
array

Returns an array of tag objects.

Group Data

getArticleGroupByType

Retrieves all articles of a certain type.

return
array

Returns an array of article objects of the specified type.

getArticleGroupByCategory

Retrieves all articles of a certain category.

return
array

Returns an array of article objects belonging to the specified category.

getArticleGroupFromArray

Retrieves articles based on an array of entity IDs.

return
array

Returns an array of article objects.

getArticlesInfo

Retrieves information for an array of article items.

return
array|object

Returns an array of article objects with additional information or a single article object with additional information.

getRelated

Retrieves related items from a related table.

return
array

Returns an array of related item objects.

search_item

Searches for a term within an item’s attributes and modules.

return
boolean

Returns true if the term is found, false otherwise.

Shop Information

getGlobalShopInfo

Retrieves global shop information, including product details.

return
array

Returns an array containing shop information, including an array of product objects.