SproutCMS

This is the code documentation for the SproutCMS project

class AttrEditorFilename

Specialised file selector input field for page attributes

Extending this class

<?php
/**
* New class description goes here
* 
* @author Your Name, 2024-11-29
**/
class NewClassName extends AttrEditorFilename {
    
    /**
    * If you have any custom javascript to run, return it using this method.
    * 
    * When your script runs, take a look at the $outer variable.
    **/
    public function javascript ($val, $attr_name) {
        // Method code goes here
    }
    
    /**
    * If your class has script needs, load them in here.
    * This is run on page load, not on ajax request.
    **/
    public function needs () {
        // Method code goes here
    }
    
    /**
    * Return HTML for editing the attribute.
    * Your attribute needs to return HTML for a single input element.
    * The field name for the element needs to be 'value'.
    **/
    public function render (string $val, string $attr_name) {
        // Method code goes here
    }
    
}
?>