@@ 275-289 (lines=15) @@ | ||
272 | /** |
|
273 | * Generate constructor for collection class. |
|
274 | */ |
|
275 | protected function generateConstructorCollectionClass() |
|
276 | { |
|
277 | $class = "\n\t".'/**'; |
|
278 | $class .= "\n\t".' * @param ViewInterface $renderer Rendering instance'; |
|
279 | $class .= "\n\t" . ' * @param QueryInterface $query Database query instance'; |
|
280 | $class .= "\n\t".' * @param string $locale Localization identifier'; |
|
281 | $class .= "\n\t".' */'; |
|
282 | $class .= "\n\t" . 'public function __construct(ViewInterface $renderer, QueryInterface $query = null, $locale = null)'; |
|
283 | $class .= "\n\t".'{'; |
|
284 | $class .= "\n\t\t" . '$this->renderer = $renderer;'; |
|
285 | $class .= "\n\t\t" . 'parent::__construct(isset($query) ? $query : new dbQuery(), $locale);'; |
|
286 | $class .= "\n\t".'}'."\n"; |
|
287 | ||
288 | return $class; |
|
289 | } |
|
290 | ||
291 | /** |
|
292 | * Generate classes for entity additional field gallery. |
|
@@ 326-340 (lines=15) @@ | ||
323 | /** |
|
324 | * Generate constructor for gallery class. |
|
325 | */ |
|
326 | protected function generateConstructorGalleryClass($fieldID) |
|
327 | { |
|
328 | $class = "\n\t" . '/**'; |
|
329 | $class .= "\n\t" . ' * @param ViewInterface $renderer Rendering instance'; |
|
330 | $class .= "\n\t" . ' * @param int $materialID Gallery material identifier'; |
|
331 | $class .= "\n\t" . ' * @param QueryInterface $query Database query instance'; |
|
332 | $class .= "\n\t" . ' */'; |
|
333 | $class .= "\n\t" . 'public function __construct(ViewInterface $renderer, $materialID, QueryInterface $query = null)'; |
|
334 | $class .= "\n\t" . '{'; |
|
335 | $class .= "\n\t\t" . '$this->renderer = $renderer;'; |
|
336 | $class .= "\n\t\t" . 'parent::__construct(isset($query) ? $query : new dbQuery(), $materialID, ' . $fieldID . ');'; |
|
337 | $class .= "\n\t" . '}' . "\n"; |
|
338 | ||
339 | return $class; |
|
340 | } |
|
341 | ||
342 | /** |
|
343 | * Create fields table row PHP class code. |
|
@@ 457-471 (lines=15) @@ | ||
454 | /** |
|
455 | * Generate constructor for table class. |
|
456 | */ |
|
457 | protected function generateConstructorTableClass() |
|
458 | { |
|
459 | $class = "\n\t" . '/**'; |
|
460 | $class .= "\n\t" . ' * @param QueryInterface $query Database query instance'; |
|
461 | $class .= "\n\t" . ' * @param ViewInterface $renderer Rendering instance'; |
|
462 | $class .= "\n\t" . ' * @param integer $entityID Entity identifier to whom this table belongs'; |
|
463 | $class .= "\n\t" . ' * @param string $locale Localization identifier'; |
|
464 | $class .= "\n\t" . ' */'; |
|
465 | $class .= "\n\t" . 'public function __construct(QueryInterface $query, ViewInterface $renderer, $entityID, $locale = null)'; |
|
466 | $class .= "\n\t" . '{'; |
|
467 | $class .= "\n\t\t" . 'parent::__construct($query, $renderer, static::$navigationIDs, $entityID, $locale);'; |
|
468 | $class .= "\n\t" . '}' . "\n"; |
|
469 | ||
470 | return $class; |
|
471 | } |
|
472 | ||
473 | /** |
|
474 | * Generate Query::where() analog for specific field. |