-
Notifications
You must be signed in to change notification settings - Fork 37
Component: View
Mostafa Soufi edited this page Sep 1, 2024
·
1 revision
The View class is used for loading view files and passing data to them.
use WP_Statistics\Components\View;
View::load('admin/dashboard', [
'user_count' => $user_count,
'page_views' => $page_views,
]);View::load(['header', 'content', 'footer'], [
'title' => 'Dashboard',
'content' => $dashboard_content,
]);$email_content = View::load('emails/weekly-report', [
'stats' => $weekly_stats,
], true);