You are here

public static function OpignoTinCanApiStatements::sendStatement in Opigno TinCan API 8

Same name and namespace in other branches
  1. 3.x src/OpignoTinCanApiStatements.php \Drupal\opigno_tincan_api\OpignoTinCanApiStatements::sendStatement()

Creates and sends statement to drupal queue.

Parameters

\TinCan\Statement $statement: The statement to send.

Return value

bool Response success flag.

10 calls to OpignoTinCanApiStatements::sendStatement()
H5pTincanRelayController::h5pTincanStatementRelay in modules/opigno_tincan_activities/src/Controller/H5pTincanRelayController.php
H5pTincanStatementRelay.
OpignoTincanLiveMeeting::createAndSendTincanStatementsForMeeting in modules/opigno_tincan_live_meeting/src/EventSubscriber/OpignoTincanLiveMeeting.php
Sends tincan statements for Live meeting.
opigno_tincan_modules_user_module_status_insert in modules/opigno_tincan_modules/opigno_tincan_modules.module
Implements hook_ENTITY_TYPE_insert().
opigno_tincan_modules_user_module_status_presave in modules/opigno_tincan_modules/opigno_tincan_modules.module
Implements hook_ENTITY_TYPE_presave().
_opigno_tincan_activities_create_and_send_statements in modules/opigno_tincan_activities/opigno_tincan_activities.module
The main function for building tincan statement object for opigno activity.

... See full list

File

src/OpignoTinCanApiStatements.php, line 259

Class

OpignoTinCanApiStatements
Class OpignoTinCanApiStatements.

Namespace

Drupal\opigno_tincan_api

Code

public static function sendStatement(Statement $statement) {
  $queue_factory = \Drupal::service('queue');
  $queue = $queue_factory
    ->get('opigno_tincan_send_tincan_statement');
  $item = new \stdClass();
  $item->statement = $statement;
  $queue
    ->createItem($item);
}