public function ViewDuplicatorTest::alterViewTemplateAfterCreation in Views Templates 8
After View Template has been created the Builder should alter it some how.
Parameters
array $view_template: The array of view template.
array $options: Options for altering.
Overrides ViewsDuplicateBuilderBase::alterViewTemplateAfterCreation
File
- tests/
modules/ views_templates_builder_test/ src/ Plugin/ ViewsTemplateBuilder/ ViewDuplicatorTest.php, line 26
Class
- ViewDuplicatorTest
- The ViewsBuilder.
Namespace
Drupal\views_templates_builder_test\Plugin\ViewsTemplateBuilderCode
public function alterViewTemplateAfterCreation(array &$view_template, $options = NULL) {
parent::alterViewTemplateAfterCreation($view_template, $options);
// Make a simple change. This one goes to 11!
$view_template['display']['default']['display_options']['pager']['options']['items_per_page'] = $options['pager_count'];
}