nextcloud/apps/dav/lib/carddav/useraddressbooks.php

24 lines
431 B
PHP

<?php
namespace OCA\DAV\CardDAV;
class UserAddressBooks extends \Sabre\CardDAV\AddressBookHome {
/**
* Returns a list of addressbooks
*
* @return array
*/
function getChildren() {
$addressbooks = $this->carddavBackend->getAddressBooksForUser($this->principalUri);
$objs = [];
foreach($addressbooks as $addressbook) {
$objs[] = new AddressBook($this->carddavBackend, $addressbook);
}
return $objs;
}
}