/var/www/vhosts/ihelp.ro/httpdocs/src/View/Cell
NameSizeModeActions
Admin/-0755rm
AchievementsCell.php14220644editdlrm
AddAddressCell.php19490644editdlrm
CountFavoritesCell.php15960644editdlrm
CountItemsCartCell.php18450644editdlrm
ListCategoriesCell.php5100644editdlrm
ListCausesCell.php5440644editdlrm
ListProductsCell.php34750644editdlrm
Edit: /var/www/vhosts/ihelp.ro/httpdocs/src/View/Cell/AchievementsCell.php (1422B)
*/ protected $_validCellOptions = []; /** * Initialization logic run at the end of object construction. * * @return void */ public function initialize(): void { } /** * Default display method. * * @return void */ public function display() { $queryDonations = $this->fetchTable('Donations')->find()->where(['Donations.is_active' => true]); $donations = $queryDonations->select([ 'totalDonations' => $queryDonations->func()->sum('value'), 'nrDonations' => $queryDonations->func()->count('*'), ])->first(); $queryUsers = $this->fetchTable('Users')->find()->where(['Users.is_active' => true]); $donors = $queryDonations->select([ 'nrDonors' => $queryUsers->func()->count('*'), ])->first(); $queryCauses = $this->fetchTable('Causes')->find()->where(['Causes.is_active' => true]); $causes = $queryCauses->select([ 'organizations' => $queryCauses->func()->count('*'), ])->first(); $this->set(compact('donations', 'donors', 'causes')); } }