public function getChildren($itemSource) { \OCP\Util::writeLog('contacts', __METHOD__.' item_source: ' . $itemSource, \OCP\Util::DEBUG); $contacts = $this->app->getBackend('local')->getContacts($itemSource); $children = array(); foreach($contacts as $contact) { $children[] = array('source' => $contact['id'], 'target' => $contact['displayname']); } return $children; }
public function __construct() { $this->app = new App(\OCP\User::getUser()); $this->backend = $this->app->getBackend('local'); }
public function __construct() { $this->app = new App(\OC::$server->getUserSession()->getUser()->getUId()); $this->backend = $this->app->getBackend('local'); }