function ctools_block_content_type_content_types

cis7 block.inc ctools_block_content_type_content_types()
cle7 block.inc ctools_block_content_type_content_types()
elmsmedia7 block.inc ctools_block_content_type_content_types()
icor7 block.inc ctools_block_content_type_content_types()
meedjum_blog7 block.inc ctools_block_content_type_content_types()
mooc7 block.inc ctools_block_content_type_content_types()

Return all block content types available.

Modules wanting to make special adjustments the way that CTools handles their blocks can implement an extension to the hook_block() family, where the function name is of the form "$module . '_ctools_block_info'".

File

sites/all/modules/ulmus/ctools/plugins/content_types/block/block.inc, line 42
Provide Drupal blocks as content.

Code

function ctools_block_content_type_content_types() {
  $types = &drupal_static(__FUNCTION__);
  if (isset($types)) {
    return $types;
  }

  $types = array();
  foreach (module_implements('block_info') as $module) {
    $module_blocks = module_invoke($module, 'block_info');
    if ($module_blocks) {
      foreach ($module_blocks as $delta => $block) {
        $info = _ctools_block_content_type_content_type($module, $delta, $block);
        // this check means modules can remove their blocks; particularly useful
        // if they offer the block some other way (like we do for views)
        if ($info) {
          $types["$module-$delta"] = $info;
        }
      }
    }
  }
  return $types;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.