public function ViewsBlock::getMachineNameSuggestion in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/src/Plugin/Block/ViewsBlock.php \Drupal\views\Plugin\Block\ViewsBlock::getMachineNameSuggestion()
Suggests a machine name to identify an instance of this block.
The block plugin need not verify that the machine name is at all unique. It is only responsible for providing a baseline suggestion; calling code is responsible for ensuring whatever uniqueness is required for the use case.
Return value
string The suggested machine name.
Overrides BlockBase::getMachineNameSuggestion
File
- core/
modules/ views/ src/ Plugin/ Block/ ViewsBlock.php, line 125 - Contains \Drupal\views\Plugin\Block\ViewsBlock.
Class
- ViewsBlock
- Provides a generic Views block.
Namespace
Drupal\views\Plugin\BlockCode
public function getMachineNameSuggestion() {
$this->view
->setDisplay($this->displayID);
return 'views_block__' . $this->view->storage
->id() . '_' . $this->view->current_display;
}