Created
January 2, 2016 15:47
-
-
Save zhabinka/e308ff24c53a632b8313 to your computer and use it in GitHub Desktop.
Выводим общее количество просмотров всех страниц, созданных пользователем.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$user = $modx->user; | |
$resource = $user->getMany('CreatedResources'); | |
foreach ($resource as $res) { | |
$views = $views + $res->getTVValue(3); | |
} | |
return $views; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Решение описано здесь - https://ilyaut.ru/xpdo/xpdo-for-dummies-part-4-practice-2/