Your IP : 3.145.152.98


Current Path : /home/ephorei/www/wp-includes/images/media/q2m9hb/
Upload File :
Current File : /home/ephorei/www/wp-includes/images/media/q2m9hb/checkbox.tar

block.json000064400000001751150062041720006532 0ustar00{
	"apiVersion": 2,
	"name": "srfm/checkbox",
	"title": "Checkbox",
	"description": "Displays a SureForm Checkbox Field",
	"category": "sureforms",
	"keywords": [ "checkbox", "toggle", "checkout", "engine" ],
	"textdomain": "sureforms",
	"supports": {
		"reusable": false,
		"html": false
	},
	"example": {
		"attributes": {
			"preview": true
		}
	},
	"attributes": {
		"preview": {
			"type": "boolean",
			"default": false
		},
		"block_id": {
			"type": "string"
		},
		"fieldWidth": {
			"type": "number",
			"default": 100
		},
		"label": {
			"type": "string",
			"default": "Checkbox"
		},
		"required": {
			"type": "boolean"
		},
		"checked": {
			"type": "boolean",
			"default": false
		},
		"help": {
			"type": "string",
			"default": ""
		},
		"errorMsg": {
			"type": "string",
			"default": ""
		},
		"formId": {
			"type": "number",
			"default": ""
		},
		"isConditionalLogic":{
			"type":"boolean",
			"default":false
		},
    "slug":{
			"type":"string",
			"default":""
		}
	}
}
block.php000064400000001217150062041720006345 0ustar00<?php
/**
 * PHP render for Text Block.
 *
 * @package SureForms.
 */

namespace SRFM\Inc\Blocks\Checkbox;

use SRFM\Inc\Blocks\Base;
use SRFM\Inc\Fields\Checkbox_Markup;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

/**
 * Address Block.
 */
class Block extends Base {
	/**
	 * Render form checkbox block
	 *
	 * @param array<mixed> $attributes Block attributes.
	 *
	 * @return string|bool
	 */
	public function render( $attributes ) {
		if ( ! empty( $attributes ) ) {
			$markup_class = new Checkbox_Markup( $attributes );
			ob_start();
			// phpcs:ignore
			echo $markup_class->markup();
		}
		return ob_get_clean();
	}
}