You are here

public function BlocacheMetadata::unsetOverrides in Blocache (Block Cache Control) 8

Unset the overwritten cache metadata.

Return value

bool Returns TRUE if the overwritten cache metadata has been deleted; FALSE, otherwise.

File

src/BlocacheMetadata.php, line 183

Class

BlocacheMetadata
Class BlocacheMetadata.

Namespace

Drupal\blocache

Code

public function unsetOverrides() {
  if (!$this
    ->isBlock()) {
    return FALSE;
  }
  $this->overridden = FALSE;
  $this->overrides = [];
  $this->block
    ->unsetThirdPartySetting(self::MODULE, self::OVERRIDEN);
  $this->block
    ->unsetThirdPartySetting(self::MODULE, 'metadata');
  return TRUE;
}