Created
June 22, 2016 18:13
-
-
Save tedbow/195181deca2bce8c5e31d6862ff94bdd to your computer and use it in GitHub Desktop.
suggestions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$new_region = NULL; | |
if (!isset($regions[$this->region]) && $this->status()) { | |
if (isset($this->original)) { | |
$original_region = $this->original->getRegion(); | |
// If \Drupal\block\BlockInterface::BLOCK_REGION_NONE was used to | |
// disable the block and we have an original region then keep in the | |
// block in the original region. | |
if (isset($regions[$original_region]) && $this->region == BlockInterface::BLOCK_REGION_NONE) { | |
$new_region = $original_region; | |
} | |
} | |
if (!$new_region) { | |
$new_region = system_default_region($this->theme); | |
} | |
$this | |
->setRegion($new_region) | |
->disable(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment