* @copyright 2007-2022 Apollotheme * @license http://apollotheme.com - prestashop template provider */ namespace LeoElements; use LeoElements\Leo_Helper; if ( ! defined( '_PS_VERSION_' ) ) { exit; // Exit if accessed directly. } /** * Elementor structure control. * * A base control for creating structure control. A private control for section * columns structure. * * @since 1.0.0 */ class Control_Structure extends Base_Data_Control { /** * Get structure control type. * * Retrieve the control type, in this case `structure`. * * @since 1.0.0 * @access public * * @return string Control type. */ public function get_type() { return 'structure'; } /** * Render structure control output in the editor. * * Used to generate the control HTML in the editor using Underscore JS * template. The variables for the class are available using `data` JS * object. * * @since 1.0.0 * @access public */ public function content_template() { $preset_control_uid = $this->get_control_uid( '{{ preset.key }}' ); ?>
<# var currentPreset = elementor.presetsFactory.getPresetByStructure( data.controlValue ); #>
{{{ elementor.presetsFactory.getPresetSVG( currentPreset.preset, 233, 72, 5 ).outerHTML }}}
<# var morePresets = getMorePresets(); if ( morePresets.length > 1 ) { #>
<# _.each( morePresets, function( preset ) { #>
{{{ preset.preset.join( ', ' ) }}}
<# } ); #>
<# } #>
<# if ( data.description ) { #>
{{{ data.description }}}
<# } #> 'none', 'label_block' => true, ]; } }