| 1 |
<?php |
| 2 |
defined('ABSPATH') || exit; |
| 3 |
|
| 4 |
/** |
| 5 |
* Module Name: Box |
| 6 |
* Description: Display box content |
| 7 |
*/ |
| 8 |
class TB_Toc_Module extends Themify_Builder_Component_Module { |
| 9 |
|
| 10 |
public static function get_module_name():string { |
| 11 |
return __('Table of Content', 'themify'); |
| 12 |
} |
| 13 |
|
| 14 |
public static function get_module_icon():string { |
| 15 |
return 'layout-width-full'; |
| 16 |
} |
| 17 |
|
| 18 |
public static function get_js_css():array { |
| 19 |
return array( |
| 20 |
'css' => 1, |
| 21 |
'js' => 1 |
| 22 |
); |
| 23 |
} |
| 24 |
|
| 25 |
public static function get_styling_image_fields() : array { |
| 26 |
return [ |
| 27 |
'background_image' => '' |
| 28 |
]; |
| 29 |
} |
| 30 |
|
| 31 |
public static function get_static_content(array $module):string { |
| 32 |
return !empty($module['mod_settings']['m_t']) ? sprintf('<h3>%s</h3>', $module['mod_settings']['m_t']) : ''; |
| 33 |
} |
| 34 |
|
| 35 |
public static function get_translatable_text_fields( $module ) : array { |
| 36 |
return [ 'm_t' ]; |
| 37 |
} |
| 38 |
} |