| Total Complexity | 8 |
| Total Lines | 94 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | trait DialogLibraryTrait |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * The dialog library helper |
||
| 21 | * |
||
| 22 | * @var DialogLibraryHelper |
||
| 23 | */ |
||
| 24 | protected $xHelper; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Get the library name |
||
| 28 | * |
||
| 29 | * @return string |
||
| 30 | */ |
||
| 31 | abstract public function getName(): string; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Get the helper |
||
| 35 | * |
||
| 36 | * @return DialogLibraryHelper |
||
| 37 | */ |
||
| 38 | public function helper(): DialogLibraryHelper |
||
| 39 | { |
||
| 40 | return $this->xHelper; |
||
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Get the library base URI |
||
| 45 | * |
||
| 46 | * @return string |
||
| 47 | */ |
||
| 48 | public function getUri(): string |
||
| 49 | { |
||
| 50 | return ''; |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * Get the library subdir for the URI |
||
| 55 | * |
||
| 56 | * @return string |
||
| 57 | */ |
||
| 58 | public function getSubdir(): string |
||
| 59 | { |
||
| 60 | return ''; |
||
| 61 | } |
||
| 62 | |||
| 63 | /** |
||
| 64 | * Get the library version for the URI |
||
| 65 | * |
||
| 66 | * @return string |
||
| 67 | */ |
||
| 68 | public function getVersion(): string |
||
| 69 | { |
||
| 70 | return ''; |
||
| 71 | } |
||
| 72 | |||
| 73 | /** |
||
| 74 | * Get the CSS header code and file includes |
||
| 75 | * |
||
| 76 | * @return string |
||
| 77 | */ |
||
| 78 | public function getJs(): string |
||
| 79 | { |
||
| 80 | return ''; |
||
| 81 | } |
||
| 82 | |||
| 83 | /** |
||
| 84 | * Get the javascript header code and file includes |
||
| 85 | * |
||
| 86 | * @return string |
||
| 87 | */ |
||
| 88 | public function getCss(): string |
||
| 91 | } |
||
| 92 | |||
| 93 | /** |
||
| 94 | * Get the javascript code to be printed into the page |
||
| 95 | * |
||
| 96 | * @return string |
||
| 97 | */ |
||
| 98 | public function getScript(): string |
||
| 101 | } |
||
| 102 | |||
| 103 | /** |
||
| 104 | * Get the javascript code to be executed on page load |
||
| 105 | * |
||
| 106 | * @return string |
||
| 107 | */ |
||
| 108 | public function getReadyScript(): string |
||
| 111 | } |
||
| 112 | } |
||
| 113 |