@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | */ |
28 | 28 | public function compile($stub, $modelName, $modelData, $scaffolderConfig, $hash, $extra = null) |
29 | 29 | { |
30 | - if (File::exists(base_path('scaffolder-config/cache/view_create_' . $hash . self::CACHE_EXT))) |
|
30 | + if (File::exists(base_path('scaffolder-config/cache/view_create_'.$hash.self::CACHE_EXT))) |
|
31 | 31 | { |
32 | 32 | return $this->store($modelName, $scaffolderConfig, '', new FileToCompile(true, $hash)); |
33 | 33 | } |
@@ -55,22 +55,22 @@ discard block |
||
55 | 55 | */ |
56 | 56 | protected function store($modelName, $scaffolderConfig, $compiled, FileToCompile $fileToCompile) |
57 | 57 | { |
58 | - $folder = PathParser::parse($scaffolderConfig->generator->paths->views) . strtolower($modelName) ; |
|
58 | + $folder = PathParser::parse($scaffolderConfig->generator->paths->views).strtolower($modelName); |
|
59 | 59 | |
60 | 60 | // create folder directory |
61 | 61 | Directory::createIfNotExists($folder, 0755, true); |
62 | 62 | |
63 | - $path = $folder . '/create.blade.php'; |
|
63 | + $path = $folder.'/create.blade.php'; |
|
64 | 64 | |
65 | 65 | // Store in cache |
66 | 66 | if ($fileToCompile->cached) |
67 | 67 | { |
68 | - File::copy(base_path('scaffolder-config/cache/view_create_' . $fileToCompile->hash . self::CACHE_EXT), $path); |
|
68 | + File::copy(base_path('scaffolder-config/cache/view_create_'.$fileToCompile->hash.self::CACHE_EXT), $path); |
|
69 | 69 | } |
70 | 70 | else |
71 | 71 | { |
72 | - File::put(base_path('scaffolder-config/cache/view_create_' . $fileToCompile->hash . self::CACHE_EXT), $compiled); |
|
73 | - File::copy(base_path('scaffolder-config/cache/view_create_' . $fileToCompile->hash . self::CACHE_EXT), $path); |
|
72 | + File::put(base_path('scaffolder-config/cache/view_create_'.$fileToCompile->hash.self::CACHE_EXT), $compiled); |
|
73 | + File::copy(base_path('scaffolder-config/cache/view_create_'.$fileToCompile->hash.self::CACHE_EXT), $path); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | return $path; |
@@ -92,12 +92,12 @@ discard block |
||
92 | 92 | { |
93 | 93 | if ($firstIteration) |
94 | 94 | { |
95 | - $fields .= sprintf(self::getInputFor($field) . PHP_EOL, $field->name); |
|
95 | + $fields .= sprintf(self::getInputFor($field).PHP_EOL, $field->name); |
|
96 | 96 | $firstIteration = false; |
97 | 97 | } |
98 | 98 | else |
99 | 99 | { |
100 | - $fields .= sprintf("\t" . self::getInputFor($field) . PHP_EOL, $field->name); |
|
100 | + $fields .= sprintf("\t".self::getInputFor($field).PHP_EOL, $field->name); |
|
101 | 101 | } |
102 | 102 | } |
103 | 103 |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | */ |
28 | 28 | public function compile($stub, $modelName, $modelData, $scaffolderConfig, $hash, $extra = null) |
29 | 29 | { |
30 | - if (File::exists(base_path('scaffolder-config/cache/view_edit_' . $hash . self::CACHE_EXT))) |
|
30 | + if (File::exists(base_path('scaffolder-config/cache/view_edit_'.$hash.self::CACHE_EXT))) |
|
31 | 31 | { |
32 | 32 | return $this->store($modelName, $scaffolderConfig, '', new FileToCompile(true, $hash)); |
33 | 33 | } |
@@ -56,22 +56,22 @@ discard block |
||
56 | 56 | */ |
57 | 57 | protected function store($modelName, $scaffolderConfig, $compiled, FileToCompile $fileToCompile) |
58 | 58 | { |
59 | - $folder = PathParser::parse($scaffolderConfig->generator->paths->views) . strtolower($modelName) ; |
|
59 | + $folder = PathParser::parse($scaffolderConfig->generator->paths->views).strtolower($modelName); |
|
60 | 60 | |
61 | 61 | // create folder directory |
62 | 62 | Directory::createIfNotExists($folder, 0755, true); |
63 | 63 | |
64 | - $path = $folder . '/edit.blade.php'; |
|
64 | + $path = $folder.'/edit.blade.php'; |
|
65 | 65 | |
66 | 66 | // Store in cache |
67 | 67 | if ($fileToCompile->cached) |
68 | 68 | { |
69 | - File::copy(base_path('scaffolder-config/cache/view_edit_' . $fileToCompile->hash . self::CACHE_EXT), $path); |
|
69 | + File::copy(base_path('scaffolder-config/cache/view_edit_'.$fileToCompile->hash.self::CACHE_EXT), $path); |
|
70 | 70 | } |
71 | 71 | else |
72 | 72 | { |
73 | - File::put(base_path('scaffolder-config/cache/view_edit_' . $fileToCompile->hash . self::CACHE_EXT), $compiled); |
|
74 | - File::copy(base_path('scaffolder-config/cache/view_edit_' . $fileToCompile->hash . self::CACHE_EXT), $path); |
|
73 | + File::put(base_path('scaffolder-config/cache/view_edit_'.$fileToCompile->hash.self::CACHE_EXT), $compiled); |
|
74 | + File::copy(base_path('scaffolder-config/cache/view_edit_'.$fileToCompile->hash.self::CACHE_EXT), $path); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | return $path; |
@@ -93,12 +93,12 @@ discard block |
||
93 | 93 | { |
94 | 94 | if ($firstIteration) |
95 | 95 | { |
96 | - $fields .= sprintf(self::getInputFor($field) . PHP_EOL, $field->name); |
|
96 | + $fields .= sprintf(self::getInputFor($field).PHP_EOL, $field->name); |
|
97 | 97 | $firstIteration = false; |
98 | 98 | } |
99 | 99 | else |
100 | 100 | { |
101 | - $fields .= sprintf("\t" . self::getInputFor($field) . PHP_EOL, $field->name); |
|
101 | + $fields .= sprintf("\t".self::getInputFor($field).PHP_EOL, $field->name); |
|
102 | 102 | } |
103 | 103 | } |
104 | 104 |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | */ |
25 | 25 | public function compile($stub, $modelName, $modelData, $scaffolderConfig, $hash, $extra = null) |
26 | 26 | { |
27 | - if (File::exists(base_path('scaffolder-config/cache/view_index_' . $hash . self::CACHE_EXT))) |
|
27 | + if (File::exists(base_path('scaffolder-config/cache/view_index_'.$hash.self::CACHE_EXT))) |
|
28 | 28 | { |
29 | 29 | return $this->store($modelName, $scaffolderConfig, '', new FileToCompile(true, $hash)); |
30 | 30 | } |
@@ -53,22 +53,22 @@ discard block |
||
53 | 53 | */ |
54 | 54 | protected function store($modelName, $scaffolderConfig, $compiled, FileToCompile $fileToCompile) |
55 | 55 | { |
56 | - $folder = PathParser::parse($scaffolderConfig->generator->paths->views) . strtolower($modelName) ; |
|
56 | + $folder = PathParser::parse($scaffolderConfig->generator->paths->views).strtolower($modelName); |
|
57 | 57 | |
58 | 58 | // create folder directory |
59 | 59 | Directory::createIfNotExists($folder, 0755, true); |
60 | 60 | |
61 | - $path = $folder . '/index.blade.php'; |
|
61 | + $path = $folder.'/index.blade.php'; |
|
62 | 62 | |
63 | 63 | // Store in cache |
64 | 64 | if ($fileToCompile->cached) |
65 | 65 | { |
66 | - File::copy(base_path('scaffolder-config/cache/view_index_' . $fileToCompile->hash . self::CACHE_EXT), $path); |
|
66 | + File::copy(base_path('scaffolder-config/cache/view_index_'.$fileToCompile->hash.self::CACHE_EXT), $path); |
|
67 | 67 | } |
68 | 68 | else |
69 | 69 | { |
70 | - File::put(base_path('scaffolder-config/cache/view_index_' . $fileToCompile->hash . self::CACHE_EXT), $compiled); |
|
71 | - File::copy(base_path('scaffolder-config/cache/view_index_' . $fileToCompile->hash . self::CACHE_EXT), $path); |
|
70 | + File::put(base_path('scaffolder-config/cache/view_index_'.$fileToCompile->hash.self::CACHE_EXT), $compiled); |
|
71 | + File::copy(base_path('scaffolder-config/cache/view_index_'.$fileToCompile->hash.self::CACHE_EXT), $path); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | return $path; |
@@ -93,12 +93,12 @@ discard block |
||
93 | 93 | { |
94 | 94 | if ($firstIteration) |
95 | 95 | { |
96 | - $fields .= sprintf("{ data: '%s', name: '%s' }," . PHP_EOL, $field->name, $field->name); |
|
96 | + $fields .= sprintf("{ data: '%s', name: '%s' },".PHP_EOL, $field->name, $field->name); |
|
97 | 97 | $firstIteration = false; |
98 | 98 | } |
99 | 99 | else |
100 | 100 | { |
101 | - $fields .= sprintf("\t\t\t\t{ data: '%s', name: '%s' }," . PHP_EOL, $field->name, $field->name); |
|
101 | + $fields .= sprintf("\t\t\t\t{ data: '%s', name: '%s' },".PHP_EOL, $field->name, $field->name); |
|
102 | 102 | } |
103 | 103 | } |
104 | 104 | } |
@@ -127,13 +127,13 @@ discard block |
||
127 | 127 | { |
128 | 128 | if ($firstIteration) |
129 | 129 | { |
130 | - $fields .= sprintf("<th>%s</th>" . PHP_EOL, ucfirst($field->name)); |
|
130 | + $fields .= sprintf("<th>%s</th>".PHP_EOL, ucfirst($field->name)); |
|
131 | 131 | $firstIteration = false; |
132 | 132 | |
133 | 133 | } |
134 | 134 | else |
135 | 135 | { |
136 | - $fields .= sprintf("\t\t\t<th>%s</th>" . PHP_EOL, ucfirst($field->name)); |
|
136 | + $fields .= sprintf("\t\t\t<th>%s</th>".PHP_EOL, ucfirst($field->name)); |
|
137 | 137 | } |
138 | 138 | } |
139 | 139 | } |
@@ -15,11 +15,11 @@ |
||
15 | 15 | { |
16 | 16 | if ($fieldData->type->ui == 'text') |
17 | 17 | { |
18 | - return '{!! Form::text(\'%s\', (isset($model)) ? $model->' . $fieldData->name . ' : null) !!}'; |
|
18 | + return '{!! Form::text(\'%s\', (isset($model)) ? $model->'.$fieldData->name.' : null) !!}'; |
|
19 | 19 | } |
20 | 20 | elseif ($fieldData->type->ui == 'textarea') |
21 | 21 | { |
22 | - return '{!! Form::textarea(\'%s\', (isset($model)) ? $model->' . $fieldData->name . ' : null) !!}'; |
|
22 | + return '{!! Form::textarea(\'%s\', (isset($model)) ? $model->'.$fieldData->name.' : null) !!}'; |
|
23 | 23 | } |
24 | 24 | } |
25 | 25 | } |
26 | 26 | \ No newline at end of file |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | */ |
45 | 45 | protected function store($modelName, $scaffolderConfig, $compiled, FileToCompile $fileToCompile) |
46 | 46 | { |
47 | - $path = PathParser::parse($scaffolderConfig->paths->views) . 'layouts/page.blade.php'; |
|
47 | + $path = PathParser::parse($scaffolderConfig->paths->views).'layouts/page.blade.php'; |
|
48 | 48 | |
49 | 49 | File::put($path, $compiled); |
50 | 50 | |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | <a href='/%s' class='waves-effect'> |
99 | 99 | %ss |
100 | 100 | </a> |
101 | - </li>", $scaffolderConfig->routing->prefix . '/' . strtolower($link), $link); |
|
101 | + </li>", $scaffolderConfig->routing->prefix.'/'.strtolower($link), $link); |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | $this->stub = str_replace('{{links}}', $navLinks, $this->stub); |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | */ |
28 | 28 | public function compile($stub, $modelName, $modelData, $scaffolderConfig, $hash, $extra = null) |
29 | 29 | { |
30 | - if (File::exists(base_path('scaffolder-config/cache/view_create_' . $hash . self::CACHE_EXT))) |
|
30 | + if (File::exists(base_path('scaffolder-config/cache/view_create_'.$hash.self::CACHE_EXT))) |
|
31 | 31 | { |
32 | 32 | return $this->store($modelName, $scaffolderConfig, '', new FileToCompile(true, $hash)); |
33 | 33 | } |
@@ -55,22 +55,22 @@ discard block |
||
55 | 55 | */ |
56 | 56 | protected function store($modelName, $scaffolderConfig, $compiled, FileToCompile $fileToCompile) |
57 | 57 | { |
58 | - $folder = PathParser::parse($scaffolderConfig->paths->views) . strtolower($modelName) ; |
|
58 | + $folder = PathParser::parse($scaffolderConfig->paths->views).strtolower($modelName); |
|
59 | 59 | |
60 | 60 | // create folder directory |
61 | 61 | Directory::createIfNotExists($folder, 0755, true); |
62 | 62 | |
63 | - $path = $folder . '/create.blade.php'; |
|
63 | + $path = $folder.'/create.blade.php'; |
|
64 | 64 | |
65 | 65 | // Store in cache |
66 | 66 | if ($fileToCompile->cached) |
67 | 67 | { |
68 | - File::copy(base_path('scaffolder-config/cache/view_create_' . $fileToCompile->hash . self::CACHE_EXT), $path); |
|
68 | + File::copy(base_path('scaffolder-config/cache/view_create_'.$fileToCompile->hash.self::CACHE_EXT), $path); |
|
69 | 69 | } |
70 | 70 | else |
71 | 71 | { |
72 | - File::put(base_path('scaffolder-config/cache/view_create_' . $fileToCompile->hash . self::CACHE_EXT), $compiled); |
|
73 | - File::copy(base_path('scaffolder-config/cache/view_create_' . $fileToCompile->hash . self::CACHE_EXT), $path); |
|
72 | + File::put(base_path('scaffolder-config/cache/view_create_'.$fileToCompile->hash.self::CACHE_EXT), $compiled); |
|
73 | + File::copy(base_path('scaffolder-config/cache/view_create_'.$fileToCompile->hash.self::CACHE_EXT), $path); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | return $path; |
@@ -92,12 +92,12 @@ discard block |
||
92 | 92 | { |
93 | 93 | if ($firstIteration) |
94 | 94 | { |
95 | - $fields .= sprintf(self::getInputFor($field) . PHP_EOL, $field->name); |
|
95 | + $fields .= sprintf(self::getInputFor($field).PHP_EOL, $field->name); |
|
96 | 96 | $firstIteration = false; |
97 | 97 | } |
98 | 98 | else |
99 | 99 | { |
100 | - $fields .= sprintf("\t" . self::getInputFor($field) . PHP_EOL, $field->name); |
|
100 | + $fields .= sprintf("\t".self::getInputFor($field).PHP_EOL, $field->name); |
|
101 | 101 | } |
102 | 102 | } |
103 | 103 |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | */ |
28 | 28 | public function compile($stub, $modelName, $modelData, $scaffolderConfig, $hash, $extra = null) |
29 | 29 | { |
30 | - if (File::exists(base_path('scaffolder-config/cache/view_edit_' . $hash . self::CACHE_EXT))) |
|
30 | + if (File::exists(base_path('scaffolder-config/cache/view_edit_'.$hash.self::CACHE_EXT))) |
|
31 | 31 | { |
32 | 32 | return $this->store($modelName, $scaffolderConfig, '', new FileToCompile(true, $hash)); |
33 | 33 | } |
@@ -56,22 +56,22 @@ discard block |
||
56 | 56 | */ |
57 | 57 | protected function store($modelName, $scaffolderConfig, $compiled, FileToCompile $fileToCompile) |
58 | 58 | { |
59 | - $folder = PathParser::parse($scaffolderConfig->paths->views) . strtolower($modelName) ; |
|
59 | + $folder = PathParser::parse($scaffolderConfig->paths->views).strtolower($modelName); |
|
60 | 60 | |
61 | 61 | // create folder directory |
62 | 62 | Directory::createIfNotExists($folder, 0755, true); |
63 | 63 | |
64 | - $path = $folder . '/edit.blade.php'; |
|
64 | + $path = $folder.'/edit.blade.php'; |
|
65 | 65 | |
66 | 66 | // Store in cache |
67 | 67 | if ($fileToCompile->cached) |
68 | 68 | { |
69 | - File::copy(base_path('scaffolder-config/cache/view_edit_' . $fileToCompile->hash . self::CACHE_EXT), $path); |
|
69 | + File::copy(base_path('scaffolder-config/cache/view_edit_'.$fileToCompile->hash.self::CACHE_EXT), $path); |
|
70 | 70 | } |
71 | 71 | else |
72 | 72 | { |
73 | - File::put(base_path('scaffolder-config/cache/view_edit_' . $fileToCompile->hash . self::CACHE_EXT), $compiled); |
|
74 | - File::copy(base_path('scaffolder-config/cache/view_edit_' . $fileToCompile->hash . self::CACHE_EXT), $path); |
|
73 | + File::put(base_path('scaffolder-config/cache/view_edit_'.$fileToCompile->hash.self::CACHE_EXT), $compiled); |
|
74 | + File::copy(base_path('scaffolder-config/cache/view_edit_'.$fileToCompile->hash.self::CACHE_EXT), $path); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | return $path; |
@@ -93,12 +93,12 @@ discard block |
||
93 | 93 | { |
94 | 94 | if ($firstIteration) |
95 | 95 | { |
96 | - $fields .= sprintf(self::getInputFor($field) . PHP_EOL, $field->name); |
|
96 | + $fields .= sprintf(self::getInputFor($field).PHP_EOL, $field->name); |
|
97 | 97 | $firstIteration = false; |
98 | 98 | } |
99 | 99 | else |
100 | 100 | { |
101 | - $fields .= sprintf("\t" . self::getInputFor($field) . PHP_EOL, $field->name); |
|
101 | + $fields .= sprintf("\t".self::getInputFor($field).PHP_EOL, $field->name); |
|
102 | 102 | } |
103 | 103 | } |
104 | 104 |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | */ |
25 | 25 | public function compile($stub, $modelName, $modelData, $scaffolderConfig, $hash, $extra = null) |
26 | 26 | { |
27 | - if (File::exists(base_path('scaffolder-config/cache/view_index_' . $hash . self::CACHE_EXT))) |
|
27 | + if (File::exists(base_path('scaffolder-config/cache/view_index_'.$hash.self::CACHE_EXT))) |
|
28 | 28 | { |
29 | 29 | return $this->store($modelName, $scaffolderConfig, '', new FileToCompile(true, $hash)); |
30 | 30 | } |
@@ -53,22 +53,22 @@ discard block |
||
53 | 53 | */ |
54 | 54 | protected function store($modelName, $scaffolderConfig, $compiled, FileToCompile $fileToCompile) |
55 | 55 | { |
56 | - $folder = PathParser::parse($scaffolderConfig->paths->views) . strtolower($modelName) ; |
|
56 | + $folder = PathParser::parse($scaffolderConfig->paths->views).strtolower($modelName); |
|
57 | 57 | |
58 | 58 | // create folder directory |
59 | 59 | Directory::createIfNotExists($folder, 0755, true); |
60 | 60 | |
61 | - $path = $folder . '/index.blade.php'; |
|
61 | + $path = $folder.'/index.blade.php'; |
|
62 | 62 | |
63 | 63 | // Store in cache |
64 | 64 | if ($fileToCompile->cached) |
65 | 65 | { |
66 | - File::copy(base_path('scaffolder-config/cache/view_index_' . $fileToCompile->hash . self::CACHE_EXT), $path); |
|
66 | + File::copy(base_path('scaffolder-config/cache/view_index_'.$fileToCompile->hash.self::CACHE_EXT), $path); |
|
67 | 67 | } |
68 | 68 | else |
69 | 69 | { |
70 | - File::put(base_path('scaffolder-config/cache/view_index_' . $fileToCompile->hash . self::CACHE_EXT), $compiled); |
|
71 | - File::copy(base_path('scaffolder-config/cache/view_index_' . $fileToCompile->hash . self::CACHE_EXT), $path); |
|
70 | + File::put(base_path('scaffolder-config/cache/view_index_'.$fileToCompile->hash.self::CACHE_EXT), $compiled); |
|
71 | + File::copy(base_path('scaffolder-config/cache/view_index_'.$fileToCompile->hash.self::CACHE_EXT), $path); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | return $path; |
@@ -93,12 +93,12 @@ discard block |
||
93 | 93 | { |
94 | 94 | if ($firstIteration) |
95 | 95 | { |
96 | - $fields .= sprintf("{ data: '%s', name: '%s' }," . PHP_EOL, $field->name, $field->name); |
|
96 | + $fields .= sprintf("{ data: '%s', name: '%s' },".PHP_EOL, $field->name, $field->name); |
|
97 | 97 | $firstIteration = false; |
98 | 98 | } |
99 | 99 | else |
100 | 100 | { |
101 | - $fields .= sprintf("\t\t\t\t{ data: '%s', name: '%s' }," . PHP_EOL, $field->name, $field->name); |
|
101 | + $fields .= sprintf("\t\t\t\t{ data: '%s', name: '%s' },".PHP_EOL, $field->name, $field->name); |
|
102 | 102 | } |
103 | 103 | } |
104 | 104 | } |
@@ -127,13 +127,13 @@ discard block |
||
127 | 127 | { |
128 | 128 | if ($firstIteration) |
129 | 129 | { |
130 | - $fields .= sprintf("<th>%s</th>" . PHP_EOL, ucfirst($field->name)); |
|
130 | + $fields .= sprintf("<th>%s</th>".PHP_EOL, ucfirst($field->name)); |
|
131 | 131 | $firstIteration = false; |
132 | 132 | |
133 | 133 | } |
134 | 134 | else |
135 | 135 | { |
136 | - $fields .= sprintf("\t\t\t<th>%s</th>" . PHP_EOL, ucfirst($field->name)); |
|
136 | + $fields .= sprintf("\t\t\t<th>%s</th>".PHP_EOL, ucfirst($field->name)); |
|
137 | 137 | } |
138 | 138 | } |
139 | 139 | } |
@@ -11,11 +11,11 @@ discard block |
||
11 | 11 | class ListControllerCompiler extends AbstractCompiler |
12 | 12 | { |
13 | 13 | protected $cachePrefix = 'list_controller_'; |
14 | - protected $stubFilename = 'ListController.js' ; |
|
14 | + protected $stubFilename = 'ListController.js'; |
|
15 | 15 | |
16 | 16 | public function __construct($scaffolderConfig, $modelData = null) |
17 | 17 | { |
18 | - $this->stubsDirectory = __DIR__ . '/../../../../stubs/AngularJs/'; |
|
18 | + $this->stubsDirectory = __DIR__.'/../../../../stubs/AngularJs/'; |
|
19 | 19 | parent::__construct($scaffolderConfig, $modelData); |
20 | 20 | } |
21 | 21 | |
@@ -37,23 +37,23 @@ discard block |
||
37 | 37 | * |
38 | 38 | * @return $this |
39 | 39 | */ |
40 | - public function replaceColumns(){ |
|
40 | + public function replaceColumns() { |
|
41 | 41 | |
42 | 42 | $columns = $this->getGridColumns(); |
43 | 43 | |
44 | - $this->stub = str_replace('{{grid_columns}}', join(",\n ", $columns) , $this->stub); |
|
44 | + $this->stub = str_replace('{{grid_columns}}', join(",\n ", $columns), $this->stub); |
|
45 | 45 | |
46 | - return $this ; |
|
46 | + return $this; |
|
47 | 47 | |
48 | 48 | } |
49 | 49 | |
50 | - public function getGridColumns(){ |
|
50 | + public function getGridColumns() { |
|
51 | 51 | |
52 | 52 | $columns = []; |
53 | 53 | |
54 | 54 | foreach ($this->modelData->fields as $field) |
55 | 55 | { |
56 | - array_push($columns, "\t\t\t".sprintf('{ name: vm. $t("%s.columns.%s"), field: "%s%s" }', $this->modelData->tableName, $field->name, $this->eagerTable, $field->name ) ); |
|
56 | + array_push($columns, "\t\t\t".sprintf('{ name: vm. $t("%s.columns.%s"), field: "%s%s" }', $this->modelData->tableName, $field->name, $this->eagerTable, $field->name)); |
|
57 | 57 | |
58 | 58 | // Check foreign key |
59 | 59 | if ($field->foreignKey && isset($field->foreignKey->eager) && $field->foreignKey->eager) |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | $foreignModelData = $this->getModelData($field->foreignKey->table); |
63 | 63 | $foreignControllerCompiler = new ListControllerCompiler($this->scaffolderConfig, $foreignModelData); |
64 | 64 | $foreignControllerCompiler->setEagerTable($field->foreignKey->table); |
65 | - $eagerColumns = $foreignControllerCompiler->getGridColumns(); |
|
65 | + $eagerColumns = $foreignControllerCompiler->getGridColumns(); |
|
66 | 66 | |
67 | 67 | $columns = array_merge($columns, $eagerColumns); |
68 | 68 | } |
@@ -81,11 +81,11 @@ discard block |
||
81 | 81 | */ |
82 | 82 | protected function getOutputFilename() |
83 | 83 | { |
84 | - $folder = PathParser::parse($this->scaffolderConfig->generator->paths->pages).$this->modelData->tableName.'/list/' ; |
|
84 | + $folder = PathParser::parse($this->scaffolderConfig->generator->paths->pages).$this->modelData->tableName.'/list/'; |
|
85 | 85 | |
86 | 86 | Directory::createIfNotExists($folder, 0755, true); |
87 | 87 | |
88 | - return $folder .$this->modelData->tableName . '_list.controller.js'; |
|
88 | + return $folder.$this->modelData->tableName.'_list.controller.js'; |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | } |
92 | 92 | \ No newline at end of file |