You are here

public function LTIToolProviderConsumerEntityController::create in LTI Tool Provider 7

Create a consumer.

Return value

object The consumer.

Overrides LTIToolProviderConsumerEntityControllerInterface::create

File

./LTIToolProviderConsumerEntityController.class.php, line 42
Contains LTIToolProviderConsumerEntityController.

Class

LTIToolProviderConsumerEntityController

Code

public function create() {
  $entity = new stdClass();
  $entity->lti_tool_provider_consumer_id = 0;
  $entity->lti_tool_provider_consumer_key = '';
  $entity->lti_tool_provider_consumer_secret = '';
  $entity->lti_tool_provider_consumer_consumer = '';
  $entity->lti_tool_provider_consumer_domain = '';
  $entity->lti_tool_provider_consumer_dummy_pref = FALSE;
  $extra_cols = lti_tool_provider_get_extra_columns();
  foreach ($extra_cols as $col) {
    $entity->{$col} = '';
  }
  return $entity;
}