1 <?php
2
3 namespace Scaffolder\Compilers;
4
5 use Scaffolder\Support\Contracts\ScaffolderThemeExtensionInterface;
6 use stdClass;
7
8 abstract class AbstractViewCompiler extends AbstractCompiler
9 {
10 11 12 13 14 15 16 17 18 19 20 21 22 23
24 abstract public function compile($stub, $modelName, $modelData, stdClass $scaffolderConfig, $hash, ScaffolderThemeExtensionInterface $themeExtension, array $extensions, $extra = null);
25
26 27 28 29 30 31 32 33
34 protected function replaceBreadcrumb($modelName, $modelLabel)
35 {
36 $this->stub = str_replace('{{breadcrumb}}', ucfirst(strtolower($modelLabel)), $this->stub);
37 $this->stub = str_replace('{{breadcrumb_lw}}', strtolower($modelName), $this->stub);
38
39 return $this;
40 }
41 }
42