|
@@ 308-322 (lines=15) @@
|
| 305 |
|
/** |
| 306 |
|
* Generate constructor for collection class. |
| 307 |
|
*/ |
| 308 |
|
protected function generateConstructorCollectionClass() |
| 309 |
|
{ |
| 310 |
|
$class = "\n\t".'/**'; |
| 311 |
|
$class .= "\n\t".' * @param ViewInterface $renderer Rendering instance'; |
| 312 |
|
$class .= "\n\t" . ' * @param QueryInterface $query Database query instance'; |
| 313 |
|
$class .= "\n\t".' * @param string $locale Localization identifier'; |
| 314 |
|
$class .= "\n\t".' */'; |
| 315 |
|
$class .= "\n\t" . 'public function __construct(ViewInterface $renderer, QueryInterface $query = null, $locale = null)'; |
| 316 |
|
$class .= "\n\t".'{'; |
| 317 |
|
$class .= "\n\t\t" . '$this->renderer = $renderer;'; |
| 318 |
|
$class .= "\n\t\t" . 'parent::__construct(isset($query) ? $query : new dbQuery(), $locale);'; |
| 319 |
|
$class .= "\n\t".'}'."\n"; |
| 320 |
|
|
| 321 |
|
return $class; |
| 322 |
|
} |
| 323 |
|
|
| 324 |
|
/** |
| 325 |
|
* Generate classes for entity additional field gallery. |
|
@@ 489-504 (lines=16) @@
|
| 486 |
|
/** |
| 487 |
|
* Generate constructor for table class. |
| 488 |
|
*/ |
| 489 |
|
protected function generateConstructorTableClass() |
| 490 |
|
{ |
| 491 |
|
$class = "\n\t" . '/**'; |
| 492 |
|
$class .= "\n\t" . ' * @param QueryInterface $query Database query instance'; |
| 493 |
|
$class .= "\n\t" . ' * @param ViewInterface $renderer Rendering instance'; |
| 494 |
|
$class .= "\n\t" . ' * @param integer $entityID Entity identifier to whom this table belongs'; |
| 495 |
|
$class .= "\n\t" . ' * @param string $locale Localization identifier'; |
| 496 |
|
$class .= "\n\t" . ' */'; |
| 497 |
|
$class .= "\n\t" . 'public function __construct(QueryInterface $query, ViewInterface $renderer, $entityID, $locale = null)'; |
| 498 |
|
$class .= "\n\t" . '{'; |
| 499 |
|
$class .= "\n\t\t" . '$this->renderer = $renderer;'; |
| 500 |
|
$class .= "\n\t\t" . 'parent::__construct($query, static::$navigationIDs, $entityID, $locale);'; |
| 501 |
|
$class .= "\n\t" . '}' . "\n"; |
| 502 |
|
|
| 503 |
|
return $class; |
| 504 |
|
} |
| 505 |
|
|
| 506 |
|
/** |
| 507 |
|
* Generate Query::where() analog for specific field. |