public function ViewsBuilderBase::createView in Views Templates 8
Create a View. Don't save it.
Parameters
mixed $options: Options to create a view.
Return value
\Drupal\views\ViewEntityInterface Returns a view.
Overrides ViewsBuilderPluginInterface::createView
1 call to ViewsBuilderBase::createView()
- NodeViewBuilder::createView in tests/
modules/ views_templates_builder_test/ src/ Plugin/ ViewsTemplateBuilder/ NodeViewBuilder.php - Create a View. Don't save it.
2 methods override ViewsBuilderBase::createView()
- NodeViewBuilder::createView in tests/
modules/ views_templates_builder_test/ src/ Plugin/ ViewsTemplateBuilder/ NodeViewBuilder.php - Create a View. Don't save it.
- ViewsDuplicateBuilderBase::createView in src/
Plugin/ ViewsDuplicateBuilderBase.php - Create a View. Don't save it.
File
- src/
Plugin/ ViewsBuilderBase.php, line 52
Class
- ViewsBuilderBase
- Base builder for View Templates.
Namespace
Drupal\views_templates\PluginCode
public function createView($options = NULL) {
$view_values = [
'id' => $options['id'],
'label' => $options['label'],
'description' => $options['description'],
'base_table' => $this
->getBaseTable(),
];
return View::create($view_values);
}