* @copyright (c) 2018, Webcraftic Ltd * * @package factory-forms * @since 1.0.0 */ // Exit if accessed directly if( !defined('ABSPATH') ) { exit; } if( !class_exists('Wbcr_FactoryForms480_TabHolder') ) { /** * Tab Control Holder * * @since 1.0.0 */ class Wbcr_FactoryForms480_TabHolder extends Wbcr_FactoryForms480_Holder { /** * A holder type. * * @since 1.0.0 * @var string */ public $type = 'tab'; /** * An align of a tab (horizontal or vertical). * * @since 1.0.0 * @var string */ public $align = 'horizontal'; /** * Creates a new instance of control holder. * * @since 1.0.0 * @param mixed[] $options A holder options. * @param FactoryForms480_Form $form A parent form. */ public function __construct($options, $form) { parent::__construct($options, $form); $this->align = isset($options['align']) ? $options['align'] : 'horizontal'; } /** * Here we should render a beginning html of the tab. * * @since 1.0.0 * @return void */ public function beforeRendering() { $is_first_tab = true; $tab_class = $this->getOption('class'); if( !empty($tab_class) ) { $this->addCssClass($tab_class); } $this->addCssClass('factory-align-' . $this->align); ?>
attrs() ?>>