Just like #2897045 - add hook_block_view_alter().

Context module should also implement hook_block_build_alter().

@see https://api.drupal.org/api/drupal/core%21modules%21block%21block.api.php...

See attached patch. Not sure if it's best place, but there is some logic before hand that i'm not sure we should run before it or not -current patch it after.

Perhaps someone can review?

Thanks.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

silverham created an issue. See original summary.

silverham’s picture

silverham’s picture

Status: Active » Needs review
bzoks’s picture

Status: Needs review » Reviewed & tested by the community

Reviewed and tested patch, everything is OK. Placement of code is also consistent with same feature from core Blocks.php.

paulocs’s picture

paulocs’s picture

Status: Reviewed & tested by the community » Fixed

  • paulocs committed e40b090 on 8.x-4.x
    Issue #2988269 by silverham, paulocs, bzoks: Add block_build_alter()...
paulocs’s picture

Fixed in dev branch!

Thanks @all

  • paulocs committed 59c8847 on 8.x-4.x
    Revert "Issue #2988269 by silverham, paulocs, bzoks: Add...
  • paulocs committed 821c962 on 8.x-4.x authored by silverham
    Issue #2988269 by silverham, paulocs, bzoks: Add block_build_alter()...
Daniel Kulbe’s picture

The $blockBuild variable is undefined. There's only $block_build available!

silverham’s picture

Status: Fixed » Needs work
FileSize
817 bytes

As @daniel-kulbe has pointed out my variable has been misspelt - patch is attached.

  • paulocs committed 1893e1e on 8.x-4.x
    Revert "Issue #2988269 by silverham, paulocs, bzoks: Add...
  • paulocs committed 5e6e455 on 8.x-4.x authored by silverham
    Issue #2988269 by silverham, paulocs, bzoks, Daniel Kulbe: Add...
paulocs’s picture

Status: Needs work » Fixed

Thanks @all! Fixed in dev branch.
Good catch @Daniel Kulbe

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.