As of 4.7 we can set all block properties in the hook_block. (This is a change made as part of the block region patch, but one I evidently forgot to document.) So it seems slightly cleaner to do this rather than using a manual db insert.

(I haven't tested this patch.)

CommentFileSizeAuthor
#2 devel-block_0.patch926 bytesnedjo
devel-block.patch1.41 KBnedjo
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

moshe weitzman’s picture

Status: Needs review » Fixed

wow, good tip. committed.

nedjo’s picture

Assigned: Unassigned » nedjo
Status: Fixed » Needs review
FileSize
926 bytes

Sorry, I was remembering wrong.

We can indeed preset $block values, but (logically) we do it in the 'info' op, not in 'view'.

Here's a revised patch.

moshe weitzman’s picture

Status: Needs review » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)