implement profile module #14 #15

This commit is contained in:
ghost 2023-09-23 19:34:49 +03:00
parent a9f67243ba
commit 41a557cbb6
2 changed files with 163 additions and 0 deletions

View file

@ -0,0 +1,23 @@
<?php
class AppControllerModuleProfile
{
private $_user;
public function __construct(AppControllerUser $user)
{
$this->_user = $user;
}
public function render()
{
$route = isset($_GET['_route_']) ? (string) $_GET['_route_'] : '';
$stars = $this->_user->getUserPageStarsTotal();
$views = $this->_user->getUserPageViewsTotal();
$downloads = $this->_user->getUserPageDownloadsTotal();
$comments = $this->_user->getUserPageCommentsTotal();
include __DIR__ . '../../../view/theme/default/module/profile.phtml';
}
}