Core dev summit

518 views

Published on

An proposed API change for registering blocks in drupal. Would standardize the pattern by which content generation callbacks are registered.

Published in: Business, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
518
On SlideShare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide



  • Core dev summit

    1. 1. Jeff Miccolis d.o username: jmiccolis A block module change. contrib maintainer: boxes, context, strongarm, spaces, open atrium, etc...
    2. 2. I want to make hook_block() more like hook_menu().
    3. 3. function block_block_info() { $blocks = array(); $result = db_query('SELECT bid, info FROM {block_custom} ORDER BY info'); foreach ($result as $block) { $blocks[$block->bid] = array ( 'info' => $block->info; 'callback'=> 'block_custom_view', 'callback arguments' => array($block->bid), 'access callback' => 'block_access_role', 'file' => 'block.blocks.inc', ); } return $blocks; }

    ×