1 | <?php |
||
8 | abstract class Widget |
||
|
|||
9 | { |
||
10 | const MODE_ENTITY = 'entity'; |
||
11 | const MODE_QUERY = 'query'; |
||
12 | const MODE_STATIC = 'static'; |
||
13 | const MODE_BUSINESS_ENTITY = 'businessEntity'; |
||
14 | |||
15 | /** |
||
16 | * This property is not persisted, we use it to remember the view where the widget |
||
17 | * is actually rendered. |
||
18 | */ |
||
19 | protected $currentView; |
||
20 | |||
21 | /** |
||
22 | * Get the type of the object. |
||
23 | * |
||
24 | * @return string The type |
||
25 | */ |
||
26 | public function getType() |
||
30 | |||
31 | /** |
||
32 | * Guess the type of this by exploding and getting the last item. |
||
33 | * |
||
34 | * @return string The guessed type |
||
35 | */ |
||
36 | protected function guessType() |
||
42 | |||
43 | /** |
||
44 | * Set the current view. |
||
45 | * |
||
46 | * @param \Victoire\Bundle\CoreBundle\Entity\View $currentView |
||
47 | * |
||
48 | * @return \Victoire\Bundle\WidgetBundle\Entity\Widget |
||
49 | */ |
||
50 | public function setCurrentView($currentView) |
||
56 | |||
57 | /** |
||
58 | * Get the current view. |
||
59 | * |
||
60 | * @return \Victoire\Bundle\CoreBundle\Entity\View The current view |
||
61 | */ |
||
62 | public function getCurrentView() |
||
66 | } |
||
67 |