| Total Complexity | 6 |
| Total Lines | 52 |
| Duplicated Lines | 0 % |
| Coverage | 53.85% |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | class CRUDFiles { |
||
| 13 | use UrlsTrait; |
||
| 14 | protected $viewBase; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * To override for defining viewBase (default : @framework/crud) |
||
| 18 | */ |
||
| 19 | 6 | public function __construct(){ |
|
| 20 | 6 | $this->viewBase="@framework/crud"; |
|
| 21 | 6 | } |
|
| 22 | |||
| 23 | /** |
||
| 24 | * To override |
||
| 25 | * Returns the template for the index route (default : @framework/crud/index.html) |
||
| 26 | * @return string |
||
| 27 | */ |
||
| 28 | 1 | public function getViewIndex() { |
|
| 29 | 1 | return $this->viewBase."/index.html"; |
|
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * To override |
||
| 34 | * Returns the template for the edit and new instance routes (default : @framework/crud/form.html) |
||
| 35 | * @return string |
||
| 36 | */ |
||
| 37 | public function getViewForm() { |
||
| 38 | return $this->viewBase."/form.html"; |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * To override |
||
| 43 | * Returns the template for the display route (default : @framework/crud/display.html) |
||
| 44 | * @return string |
||
| 45 | */ |
||
| 46 | public function getViewDisplay() { |
||
| 47 | return $this->viewBase."/display.html"; |
||
| 48 | } |
||
| 49 | |||
| 50 | /** |
||
| 51 | * Returns the base template for all Crud actions if getBaseTemplate return a base template filename |
||
| 52 | * @return string |
||
| 53 | */ |
||
| 54 | public function getViewBaseTemplate() { |
||
| 56 | } |
||
| 57 | |||
| 58 | /** |
||
| 59 | * To override |
||
| 60 | * Returns the base template filename, default : null |
||
| 61 | */ |
||
| 62 | 6 | public function getBaseTemplate(){ |
|
| 64 | } |
||
| 65 | } |
||
| 66 | |||
| 67 |