: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
api.ModuleToc = class extends api.Module {
class: 'tb_tabs_fullwidth',
default:['h1','h2','h3','h4','h5','h6'],
wrap_class: 'tb_custom_toc',
wrap_class: 'tb_toc_min_ic',
wrap_class: 'tb_toc_colapse',
show: 'tb_toc_colapse_ic'
hide: 'tb_toc_colapse_ic'
wrap_class: 'tb_toc_colapse_ic',
static builderSave(settings) {
in_tags: 'h1|h2|h3|h4|h5|h6',
if (settings[key] === def[key]) {
if (settings.min?.toString()=== def.min) {
if (settings.maxh?.toString() === def.maxh) {
if (settings.in_cont !== 'cust') {
delete settings.in_custom;
if (settings.mark !== 'ic') {
if (settings.tree === 'no' || settings.colapse === 'no') {
if (settings.tree === 'no') {
if (settings.minimize !== 'yes') {
super.builderSave(settings);
const module = createElement(),
head = createElement('','tb_toc_head tf_clearfix'),
mark = data.mark || 'none',
classes = ['module', 'module-toc', 'tb_toc_' + mark],
head.appendChild(this.constructor.getModuleTitle(data.m_t, 'm_t'));
if (data.num === 'yes') {
classes.push('tb_toc_show_num');
if (data.tree !== 'no') {
classes.push('tb_toc_tree');
module.className = classes.join(' ');
dataset.min = data.min >= 1 ? data.min : 2;
dataset.maxh = data.maxh > 2 ? data.maxh : 32;
dataset.tags = data.in_tags;
dataset.cont = data.in_cont || 'b';
if (data.ex_m_t === 'yes') {
if (data.minimize === 'yes') {
dataset.bp = data.bp || '';
head.append(api.Helper.getIcon((data.mic || 'ti-angle-down'), 'tb_toc_mic_close'), api.Helper.getIcon((data.mmic || 'ti-angle-up'), 'tb_toc_mic tf_hide'));
dataset.excl = data.ex_tags;
dataset.sel = data.in_custom;
module.appendChild(head);
if (mark === 'ic' && data.ic) {
const tpl = createElement('template','tpl_toc_ic');
tpl.content.appendChild(api.Helper.getIcon(data.ic, 'tb_toc_ic'));
if (data.tree !== 'no' && data.colapse !== 'no') {
const cic = createElement('template', 'tpl_toc_cic'),
cic_close = createElement('template','tpl_toc_cic_close'),
colapsedown = data.cic || '-',
colapseup = data.cmic || '+';
if (colapsedown === '-') {
cic.content.appendChild(createElement('span','tf_fa tb_toc_cic'));
cic.content.appendChild(api.Helper.getIcon(colapsedown, 'tb_toc_cic'));
cic_close.content.appendChild(createElement('span','tf_fa tb_toc_cic_close tf_hide'));
cic_close.content.appendChild(api.Helper.getIcon(colapseup, 'tb_toc_cic_close tf_hide'));
module.append(cic, cic_close);