1 | <?php |
||
22 | trait EntityViewMethods |
||
23 | { |
||
24 | |||
25 | /** |
||
26 | * For entity retrieval |
||
27 | */ |
||
28 | use EntityBasedMethods; |
||
29 | |||
30 | /** |
||
31 | * Add a warning flash message |
||
32 | * |
||
33 | * @param string $message |
||
34 | * @return self |
||
35 | */ |
||
36 | abstract public function addWarningMessage($message); |
||
37 | |||
38 | /** |
||
39 | * Get missing entity warning message |
||
40 | * |
||
41 | * @param mixed $entityId |
||
42 | * |
||
43 | * @return string |
||
44 | */ |
||
45 | protected function getMissingEntityMessage($entityId) |
||
50 | |||
51 | /** |
||
52 | * Redirect callback after missing entity detection |
||
53 | * |
||
54 | * @return $this|\Slick\Mvc\ControllerInterface|static |
||
55 | */ |
||
56 | protected function redirectFromMissingEntity() |
||
60 | |||
61 | /** |
||
62 | * Handles the request to view an entity |
||
63 | * |
||
64 | * @param int $entityId |
||
65 | */ |
||
66 | public function show($entityId = 0) |
||
81 | } |