@@ -85,6 +85,10 @@ discard block |
||
| 85 | 85 | |
| 86 | 86 | protected $pager; |
| 87 | 87 | |
| 88 | + /** |
|
| 89 | + * @param EntityRepository $repository |
|
| 90 | + * @param GenericManager $manager |
|
| 91 | + */ |
|
| 88 | 92 | public function __construct($name, $repository, $manager, AdminConfig $adminConfig) |
| 89 | 93 | { |
| 90 | 94 | $this->name = $name; |
@@ -101,7 +105,7 @@ discard block |
||
| 101 | 105 | /** |
| 102 | 106 | * Generate a route for admin and action name |
| 103 | 107 | * |
| 104 | - * @param $actionName |
|
| 108 | + * @param string $actionName |
|
| 105 | 109 | * @return string |
| 106 | 110 | * @throws Exception |
| 107 | 111 | */ |
@@ -143,7 +147,7 @@ discard block |
||
| 143 | 147 | } |
| 144 | 148 | |
| 145 | 149 | /** |
| 146 | - * @return mixed |
|
| 150 | + * @return string |
|
| 147 | 151 | */ |
| 148 | 152 | public function getEntityNamespace() |
| 149 | 153 | { |
@@ -159,7 +163,7 @@ discard block |
||
| 159 | 163 | } |
| 160 | 164 | |
| 161 | 165 | /** |
| 162 | - * @return mixed |
|
| 166 | + * @return ArrayCollection |
|
| 163 | 167 | */ |
| 164 | 168 | public function getEntities() |
| 165 | 169 | { |
@@ -175,7 +179,7 @@ discard block |
||
| 175 | 179 | } |
| 176 | 180 | |
| 177 | 181 | /** |
| 178 | - * @return mixed |
|
| 182 | + * @return string |
|
| 179 | 183 | */ |
| 180 | 184 | public function getFormType() |
| 181 | 185 | { |
@@ -183,7 +187,7 @@ discard block |
||
| 183 | 187 | } |
| 184 | 188 | |
| 185 | 189 | /** |
| 186 | - * @return mixed |
|
| 190 | + * @return Controller |
|
| 187 | 191 | */ |
| 188 | 192 | public function getController() |
| 189 | 193 | { |
@@ -228,7 +232,7 @@ discard block |
||
| 228 | 232 | /** |
| 229 | 233 | * Find a entity by one of its field |
| 230 | 234 | * |
| 231 | - * @param $field |
|
| 235 | + * @param string $field |
|
| 232 | 236 | * @param $value |
| 233 | 237 | * @return null|object |
| 234 | 238 | * @throws Exception |
@@ -250,6 +250,9 @@ |
||
| 250 | 250 | return $manager; |
| 251 | 251 | } |
| 252 | 252 | |
| 253 | + /** |
|
| 254 | + * @param string $title |
|
| 255 | + */ |
|
| 253 | 256 | protected function getDefaultActionTitle($title, $action) |
| 254 | 257 | { |
| 255 | 258 | $default = $title; |
@@ -322,7 +322,7 @@ |
||
| 322 | 322 | 'routing' => [ |
| 323 | 323 | 'name_pattern' => 'bluebear.admin.{admin}', |
| 324 | 324 | 'url_pattern' => '/{admin}/{action}', |
| 325 | - ] |
|
| 325 | + ] |
|
| 326 | 326 | ]; |
| 327 | 327 | } |
| 328 | 328 | } |
@@ -75,6 +75,9 @@ discard block |
||
| 75 | 75 | } |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | + /** |
|
| 79 | + * @param string $entityNamespace |
|
| 80 | + */ |
|
| 78 | 81 | public function create($entityNamespace) |
| 79 | 82 | { |
| 80 | 83 | $entity = new $entityNamespace; |
@@ -142,6 +145,9 @@ discard block |
||
| 142 | 145 | return $callback; |
| 143 | 146 | } |
| 144 | 147 | |
| 148 | + /** |
|
| 149 | + * @param string $method |
|
| 150 | + */ |
|
| 145 | 151 | protected function methodMatch($method) |
| 146 | 152 | { |
| 147 | 153 | return array_key_exists($method, $this->methodsMapping); |