|
@@ 128-145 (lines=18) @@
|
| 125 |
|
/** |
| 126 |
|
* Generate constructor for application class. |
| 127 |
|
*/ |
| 128 |
|
protected function generateConstructorApplicationClass() |
| 129 |
|
{ |
| 130 |
|
$class = "\n\t".'/**'; |
| 131 |
|
$class .= "\n\t".' * Render materials list with pager'; |
| 132 |
|
$class .= "\n\t".' *'; |
| 133 |
|
$class .= "\n\t".' * @param string $navigationId Structure identifier'; |
| 134 |
|
$class .= "\n\t".' * @param string $search Keywords to filter table'; |
| 135 |
|
$class .= "\n\t".' * @param int $page Current table page'; |
| 136 |
|
$class .= "\n\t".' * @return array Asynchronous response containing status and materials list with pager on success'; |
| 137 |
|
$class .= "\n\t".' * or just status on asynchronous controller failure'; |
| 138 |
|
$class .= "\n\t".' */'; |
| 139 |
|
$class .= "\n\t".'public function __async_collection($navigationId = \'0\', $search = \'\', $page = 1)'; |
| 140 |
|
$class .= "\n\t".'{'; |
| 141 |
|
$class .= "\n\t\t".'return parent::__async_collection(self::$navigation, $search, $page);'; |
| 142 |
|
$class .= "\n\t".'}'."\n"; |
| 143 |
|
|
| 144 |
|
return $class; |
| 145 |
|
} |
| 146 |
|
|
| 147 |
|
/** |
| 148 |
|
* Generate constructor for application class. |
|
@@ 150-167 (lines=18) @@
|
| 147 |
|
/** |
| 148 |
|
* Generate constructor for application class. |
| 149 |
|
*/ |
| 150 |
|
protected function generateConstructorApplicationCollectionClass() |
| 151 |
|
{ |
| 152 |
|
$class = "\n\t".'/**'; |
| 153 |
|
$class .= "\n\t".' * Generic collection constructor'; |
| 154 |
|
$class .= "\n\t".' *'; |
| 155 |
|
$class .= "\n\t".' * @param RenderInterface $renderer View render object'; |
| 156 |
|
$class .= "\n\t".' * @param QueryInterface $query Query object'; |
| 157 |
|
$class .= "\n\t".' */'; |
| 158 |
|
$class .= "\n\t".'public function __async_collection($renderer, $query = null, $pager = null)'; |
| 159 |
|
$class .= "\n\t".'{'; |
| 160 |
|
$class .= "\n\t\t".'return parent::__async_collection($renderer, $query = null, $pager = null);'; |
| 161 |
|
$class .= "\n\t\t".'$this->fields = array('; |
| 162 |
|
$class .= "\n\t\t\t".'new Control(),'; |
| 163 |
|
$class .= "\n\t\t".');'; |
| 164 |
|
$class .= "\n\t".'}'."\n"; |
| 165 |
|
|
| 166 |
|
return $class; |
| 167 |
|
} |
| 168 |
|
|
| 169 |
|
/** |
| 170 |
|
* Create fields table row PHP class code. |