← Back to team overview

mahara-contributors team mailing list archive

[Bug 1600101] [NEW] Examples of how we can utilise the connection manager

 

Public bug reported:

There are two example plugins called 'notification/redirect' and
'module/syncprofile' that use different ways to connect sites together

notification/redirect shows how we can use an existing api hook - in
this case the notification hook called notify_user()

module/syncprofile works by exposing it's hook via the following code,
which looks to see if there is a 'sync_profile' function in any of the
plugins:

if ($connections = Plugin::get_webservice_connections($USER, 'sync_profile')) {
  foreach ($connections as $connection) {
    call_static_method($connection->connection->class, 'sync_profile', $connection, $USER, $values);
  }
}

** Affects: mahara
     Importance: Wishlist
     Assignee: Robert Lyon (robertl-9)
         Status: In Progress

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1600101

Title:
  Examples of how we can utilise the connection manager

Status in Mahara:
  In Progress

Bug description:
  There are two example plugins called 'notification/redirect' and
  'module/syncprofile' that use different ways to connect sites together

  notification/redirect shows how we can use an existing api hook - in
  this case the notification hook called notify_user()

  module/syncprofile works by exposing it's hook via the following code,
  which looks to see if there is a 'sync_profile' function in any of the
  plugins:

  if ($connections = Plugin::get_webservice_connections($USER, 'sync_profile')) {
    foreach ($connections as $connection) {
      call_static_method($connection->connection->class, 'sync_profile', $connection, $USER, $values);
    }
  }

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1600101/+subscriptions


Follow ups