/** * Notification service factory * * @param \Elgg\Di\ServiceProvider $c Dependency injection container * @return \Elgg\Notifications\NotificationsService */ protected function getNotifications(\Elgg\Di\ServiceProvider $c) { // @todo move queue in service provider $queue = new \Elgg\Queue\DatabaseQueue(\Elgg\Notifications\NotificationsService::QUEUE_NAME, $c->db); $sub = new \Elgg\Notifications\SubscriptionsService($c->db); $access = elgg_get_access_object(); return new \Elgg\Notifications\NotificationsService($sub, $queue, $c->hooks, $access); }
/** * Get current ignore access setting. * * @return bool * @since 1.7.0 * @see http://docs.elgg.org/Access/IgnoreAccess * @see elgg_set_ignore_access() */ function elgg_get_ignore_access() { return elgg_get_access_object()->getIgnoreAccess(); }
/** * Notification service factory * * @param Elgg_Di_ServiceProvider $c Dependency injection container * @return Elgg_Notifications_NotificationsService */ protected function getNotifications(Elgg_Di_ServiceProvider $c) { // @todo move queue in service provider $queue = new Elgg_Util_DatabaseQueue(Elgg_Notifications_NotificationsService::QUEUE_NAME, $c->db); $sub = new Elgg_Notifications_SubscriptionsService($c->db); $access = elgg_get_access_object(); return new Elgg_Notifications_NotificationsService($sub, $queue, $c->hooks, $access); }