|
@@ 267-281 (lines=15) @@
|
| 264 |
|
/** |
| 265 |
|
* Generate constructor for collection class. |
| 266 |
|
*/ |
| 267 |
|
protected function generateConstructorCollectionClass() |
| 268 |
|
{ |
| 269 |
|
$class = "\n\t".'/**'; |
| 270 |
|
$class .= "\n\t".' * @param ViewInterface $renderer Rendering instance'; |
| 271 |
|
$class .= "\n\t" . ' * @param QueryInterface $query Database query instance'; |
| 272 |
|
$class .= "\n\t".' * @param string $locale Localization identifier'; |
| 273 |
|
$class .= "\n\t".' */'; |
| 274 |
|
$class .= "\n\t" . 'public function __construct(ViewInterface $renderer, QueryInterface $query = null, $locale = null)'; |
| 275 |
|
$class .= "\n\t".'{'; |
| 276 |
|
$class .= "\n\t\t" . '$this->renderer = $renderer;'; |
| 277 |
|
$class .= "\n\t\t" . 'parent::__construct(isset($query) ? $query : new dbQuery(), $locale);'; |
| 278 |
|
$class .= "\n\t".'}'."\n"; |
| 279 |
|
|
| 280 |
|
return $class; |
| 281 |
|
} |
| 282 |
|
|
| 283 |
|
/** |
| 284 |
|
* Create fields table row PHP class code. |
|
@@ 398-412 (lines=15) @@
|
| 395 |
|
/** |
| 396 |
|
* Generate constructor for table class. |
| 397 |
|
*/ |
| 398 |
|
protected function generateConstructorTableClass() |
| 399 |
|
{ |
| 400 |
|
$class = "\n\t" . '/**'; |
| 401 |
|
$class .= "\n\t" . ' * @param QueryInterface $query Database query instance'; |
| 402 |
|
$class .= "\n\t" . ' * @param ViewInterface $renderer Rendering instance'; |
| 403 |
|
$class .= "\n\t" . ' * @param integer $entityID Entity identifier to whom this table belongs'; |
| 404 |
|
$class .= "\n\t" . ' * @param string $locale Localization identifier'; |
| 405 |
|
$class .= "\n\t" . ' */'; |
| 406 |
|
$class .= "\n\t" . 'public function __construct(QueryInterface $query, ViewInterface $renderer, $entityID, $locale = null)'; |
| 407 |
|
$class .= "\n\t" . '{'; |
| 408 |
|
$class .= "\n\t\t" . 'parent::__construct($query, $renderer, static::$navigationIDs, $entityID, $locale);'; |
| 409 |
|
$class .= "\n\t" . '}' . "\n"; |
| 410 |
|
|
| 411 |
|
return $class; |
| 412 |
|
} |
| 413 |
|
|
| 414 |
|
/** |
| 415 |
|
* Generate classes for entity additional field gallery |