Heray-Was-Here
Server : Apache
System : Linux ip-172-26-6-158 5.10.0-35-cloud-amd64 #1 SMP Debian 5.10.237-1 (2025-05-19) x86_64
User : daemon ( 1)
PHP Version : 8.1.10
Disable Function : NONE
Directory :  /bitnami/wordpress/wp-content/plugins/fluentform-signature/src/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /bitnami/wordpress/wp-content/plugins/fluentform-signature/src/Field.php
<?php

namespace FluentFormSignature;

use FluentForm\App\Services\FormBuilder\Components\BaseComponent;

class Field extends BaseComponent
{
    /**
     * The signature field compiler.
     *
     * @param array     $data
     * @param \stdClass $form
     */
    public function compile($data, $form)
    {
        $elMarkup = $this->getHtml(__DIR__.'/resources/field.php', ['data' => $data, 'form' => $form]);

        echo $this->buildElementMarkup($elMarkup, $data, $form);

        $this->enqueuePublicScripts();
    }

    /**
     * Enqueue the scripts on the form page.
     */
    private function enqueuePublicScripts()
    {
        wp_enqueue_style(
            'fluentform-signature',
            FLUENTFORM_SIGNATURE_URL.'public/css/fluentform-signature.css',
            [],
            FLUENTFORM_SIGNATURE_VERSION
        );

        wp_enqueue_script(
            'signature_pad',
            FLUENTFORM_SIGNATURE_URL.'public/js/signature_pad.js',
            ['jquery'],
            '2.3.2',
            true
        );

        wp_enqueue_script(
            'fluentform-signature',
            FLUENTFORM_SIGNATURE_URL.'public/js/fluentform-signature.js',
            ['jquery', 'fluent-form-submission'],
            FLUENTFORM_SIGNATURE_VERSION,
            true
        );
    }

    /**
     * Get the rendered html from a file.
     *
     * @param  string $file
     * @param  array  $data
     * @return string
     */
    private function getHtml($file, $data = [])
    {
        ob_start();
        extract($data);
        include $file;
        return ob_get_clean();
    }
}

Hry