Issue #2153973 by olli: Unable to hide views block title.
parent
63f2e26eba
commit
b520d1de87
|
@ -265,6 +265,14 @@ class DisplayBlockTest extends ViewTestBase {
|
||||||
$this->drupalGet('');
|
$this->drupalGet('');
|
||||||
$result = $this->xpath('//div[contains(@class, "region-sidebar-first")]/div[contains(@class, "block-views")]/h2');
|
$result = $this->xpath('//div[contains(@class, "region-sidebar-first")]/div[contains(@class, "block-views")]/h2');
|
||||||
$this->assertEqual((string) $result[0], 'test_view_block');
|
$this->assertEqual((string) $result[0], 'test_view_block');
|
||||||
|
|
||||||
|
// Hide the title.
|
||||||
|
$block->getPlugin()->setConfigurationValue('label_display', FALSE);
|
||||||
|
$block->save();
|
||||||
|
|
||||||
|
$this->drupalGet('');
|
||||||
|
$result = $this->xpath('//div[contains(@class, "region-sidebar-first")]/div[contains(@class, "block-views")]/h2');
|
||||||
|
$this->assertTrue(empty($result), 'The title is not visible.');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -36,7 +36,6 @@ class ViewsBlock extends ViewsBlockBase {
|
||||||
else {
|
else {
|
||||||
$this->configuration['label'] = $this->configuration['views_label'];
|
$this->configuration['label'] = $this->configuration['views_label'];
|
||||||
}
|
}
|
||||||
$this->configuration['label_display'] = TRUE;
|
|
||||||
// Before returning the block output, convert it to a renderable array
|
// Before returning the block output, convert it to a renderable array
|
||||||
// with contextual links.
|
// with contextual links.
|
||||||
$this->addContextualLinks($output);
|
$this->addContextualLinks($output);
|
||||||
|
|
Loading…
Reference in New Issue