mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
docs(caldav): improve documentation of CalDavBackend::getCalendarsForUserCount
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
This commit is contained in:
parent
2f3ceecf92
commit
3f631400f7
1 changed files with 4 additions and 6 deletions
|
|
@ -216,15 +216,13 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
|
|||
}
|
||||
|
||||
/**
|
||||
* Return the number of calendars for a principal
|
||||
* Return the number of calendars owned by the given principal.
|
||||
*
|
||||
* By default this excludes the automatically generated birthday calendar
|
||||
* Calendars shared with the given principal are not counted!
|
||||
*
|
||||
* @param $principalUri
|
||||
* @param bool $excludeBirthday
|
||||
* @return int
|
||||
* By default, this excludes the automatically generated birthday calendar.
|
||||
*/
|
||||
public function getCalendarsForUserCount($principalUri, $excludeBirthday = true) {
|
||||
public function getCalendarsForUserCount(string $principalUri, bool $excludeBirthday = true): int {
|
||||
$principalUri = $this->convertPrincipal($principalUri, true);
|
||||
$query = $this->db->getQueryBuilder();
|
||||
$query->select($query->func()->count('*'))
|
||||
|
|
|
|||
Loading…
Reference in a new issue