Lecker home page
Search...
⌘K
Support
Dashboard
Dashboard
Search...
Navigation
Frontend Controller
Detail_Load_Frontend
Documentation
Controllers
lecker
github
treat agency
MY Controller
Introduction
MY_Controller_Data
MY_Controller_Debug
MY_Controller_Lingual
MY_Controller_Modules
Lecker Controller
Introduction
Content Controller
Introduction
Article_Entity_Content
File_Content
Helper_Content
Image_Content
Item_Dev_Content
Lecker_Content
Meta_Content
Modules_Content
Noarticle_Entity_Content
Shop_Content
Tags_Content
Frontend Controller
Introduction
Data_Frontend
Detail_Load_Frontend
Format_Frontend
Forms Frontend
Helper_Frontend
Language Frontend
Module_Frontend
Pages_Frontend
User_Frontend
Backend Controller
Introduction
Helper_Backend
Repository Controller
Introduction
Shop Controller
Introduction
Authentication Controller
Introduction
User Controller
Introduction
On this page
Methods
detail
load_view
getOpenaiData
Frontend Controller
Detail_Load_Frontend
A trait for handling article details and view loading in a frontend application
This trait provides functionality for loading and displaying article details, as well as handling view loading with additional data preparation.
Methods
detail
Loads and displays the details of an article.
pretty_url
string
The pretty URL of the article to display
print
boolean
default:
false
Whether to render the page for printing
return
boolean
default:
false
If true, returns the rendered view as a string instead of outputting it
This method performs the following tasks:
Retrieves general data such as language and login status
Fetches the article by its pretty URL
Checks language compatibility and redirects if necessary
Retrieves related articles
Prepares SEO data
Loads module data
Renders the detail view or returns it as a string
load_view
Loads and renders a view with additional data preparation.
view
string
The name of the view to load
viewdata
array
An array of data to pass to the view
This method:
Prepares OpenAI-related data
Sets up SEO and Open Graph data
Handles cookie warnings
Prepares menu items and translations
Loads and renders the specified view along with header and footer
getOpenaiData
Prepares OpenAI-related data for use in views.
data
array
The existing data array to augment with OpenAI data
return
array
The augmented data array containing OpenAI-related information
This method:
Retrieves page settings for conditional OpenAI display
Fetches available languages and language lines
Retrieves and processes OpenAI prompts
Determines the preselected language
Gets the last chat ID
Data_Frontend
Format_Frontend
Assistant
Responses are generated using AI and may contain mistakes.