@@ 169-190 (lines=22) @@ | ||
166 | return $output; |
|
167 | } |
|
168 | ||
169 | public function generateShow() |
|
170 | { |
|
171 | $output = ''; |
|
172 | ||
173 | foreach ($this->getTableColumns() as $column) { |
|
174 | $name = $column->getName(); |
|
175 | ||
176 | // set column label |
|
177 | $comment = $column->getComment(); |
|
178 | $comment = explode(' ', $comment)[0]; |
|
179 | if (!$comment) { |
|
180 | $comment = $name; |
|
181 | } |
|
182 | $label = $this->formatLabel($comment); |
|
183 | ||
184 | $output .= sprintf($this->formats['show_field'], $name, $label); |
|
185 | ||
186 | $output .= ";\r\n"; |
|
187 | } |
|
188 | ||
189 | return $output; |
|
190 | } |
|
191 | ||
192 | public function generateGrid() |
|
193 | { |
|
@@ 192-210 (lines=19) @@ | ||
189 | return $output; |
|
190 | } |
|
191 | ||
192 | public function generateGrid() |
|
193 | { |
|
194 | $output = ''; |
|
195 | ||
196 | foreach ($this->getTableColumns() as $column) { |
|
197 | $name = $column->getName(); |
|
198 | $comment = $column->getComment(); |
|
199 | $comment = explode(' ', $comment)[0]; |
|
200 | if (!$comment) { |
|
201 | $comment = $name; |
|
202 | } |
|
203 | $label = $this->formatLabel($comment); |
|
204 | ||
205 | $output .= sprintf($this->formats['grid_column'], $name, $label); |
|
206 | $output .= ";\r\n"; |
|
207 | } |
|
208 | ||
209 | return $output; |
|
210 | } |
|
211 | ||
212 | protected function getReservedColumns() |
|
213 | { |