@@ 220-240 (lines=21) @@ | ||
217 | /** |
|
218 | * {@inheritdoc} |
|
219 | */ |
|
220 | final public function fireDisplay() |
|
221 | { |
|
222 | if (! method_exists($this, 'callDisplay')) { |
|
223 | return; |
|
224 | } |
|
225 | ||
226 | $display = $this->app->call([$this, 'callDisplay']); |
|
227 | ||
228 | if (! ($display instanceof DisplayInterface)) { |
|
229 | throw new InvalidArgumentException( |
|
230 | sprintf( |
|
231 | 'callDisplay must be instanced of "%s".', |
|
232 | DisplayInterface::class |
|
233 | ) |
|
234 | ); |
|
235 | } |
|
236 | ||
237 | $display->setModel($this->getModel()); |
|
238 | ||
239 | return $display; |
|
240 | } |
|
241 | ||
242 | public function get() |
|
243 | { |
|
@@ 255-274 (lines=20) @@ | ||
252 | /** |
|
253 | * {@inheritdoc} |
|
254 | */ |
|
255 | final public function fireCreate() |
|
256 | { |
|
257 | if (! method_exists($this, 'callCreate')) { |
|
258 | return; |
|
259 | } |
|
260 | ||
261 | $form = $this->app->call([$this, 'callCreate']); |
|
262 | if (! $form instanceof FormInterface) { |
|
263 | throw new InvalidArgumentException( |
|
264 | sprintf( |
|
265 | 'callCreate must be instanced of "%s".', |
|
266 | FormInterface::class |
|
267 | ) |
|
268 | ); |
|
269 | } |
|
270 | ||
271 | $form->setModel($this->getModel()); |
|
272 | ||
273 | return $form; |
|
274 | } |
|
275 | ||
276 | /** |
|
277 | * {@inheritdoc} |