protected function SimplenewsSpool::getSourceImplementation in Simplenews 7.2
Same name and namespace in other branches
- 7 includes/simplenews.source.inc \SimplenewsSpool::getSourceImplementation()
 
Return the Simplenews source implementation for the given mail spool row.
1 call to SimplenewsSpool::getSourceImplementation()
- SimplenewsSpool::nextSource in includes/
simplenews.source.inc  - Implements SimplenewsSpoolInterface::nextSource();
 
File
- includes/
simplenews.source.inc, line 332  - Contains SimplenewsSource interface and implementations.
 
Class
- SimplenewsSpool
 - Simplenews Spool implementation.
 
Code
protected function getSourceImplementation($spool_data) {
  $default = $spool_data->entity_type == 'node' ? 'SimplenewsSourceNode' : NULL;
  // First check if there is a class set for this entity type (default
  // 'simplenews_source_node' to SimplenewsSourceNode.
  $class = variable_get('simplenews_source_' . $spool_data->entity_type, $default);
  // If no class was found, fall back to the generic 'simplenews_source'
  // variable.
  if (empty($class)) {
    $class = variable_get('simplenews_source', 'SimplenewsSourceEntity');
  }
  return $class;
}