# themify-builder/trunk/modules/module-toc.php

Themify Builder, version trunk. 38 lines.

- Page: https://pluginprobe.com/plugins/themify-builder/trunk/code/modules/module-toc.php
- Raw: https://pluginprobe.com/plugins/themify-builder/trunk/raw/modules/module-toc.php
- Modified: 2024-11-22T03:20:26+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/themify-builder/trunk/code/modules/module-toc.php#L10-L20`.

```php
<?php
defined('ABSPATH') || exit;

/**
 * Module Name: Box
 * Description: Display box content
 */
class TB_Toc_Module extends Themify_Builder_Component_Module {

    public static function get_module_name():string {
        return __('Table of Content', 'themify');
    }

    public static function get_module_icon():string {
        return 'list';
    }

    public static function get_js_css():array {
        return array(
            'css' => 1,
            'js' => 1
        );
    }

    public static function get_styling_image_fields() : array {
        return [
            'background_image' => ''
        ];
    }

    public static function get_static_content(array $module):string {
        return !empty($module['mod_settings']['m_t']) ? sprintf('<h3>%s</h3>', $module['mod_settings']['m_t']) : '';
    }

	public static function get_translatable_text_fields( $module ) : array {
		return [ 'm_t' ];
	}
}
```
