protected function replaceCommonTemplates(&$stub, ViewInput $input, array $fields)
    {
        $viewLabels = new ViewLabelsGenerator($input->modelName, $fields, $this->isCollectiveTemplate());

        $standardLabels = $viewLabels->getLabels();

        $this->replaceModelName($stub, $input->modelName)
            ->replaceRouteNames($stub, $this->getModelName($input->modelName), $input->prefix)
            ->replaceViewNames($stub, $input->viewsDirectory, $input->prefix)
            ->replaceLayoutName($stub, $input->layout)
            ->replaceStandardLabels($stub, $standardLabels);

        return $this;
    }