SproutCMS

This is the code documentation for the SproutCMS project

class LinkSpecDocument

Extending this class

<?php
/**
* New class description goes here
* 
* @author Your Name, 2024-11-25
**/
class NewClassName extends LinkSpecDocument {
    
    /**
    * Get the URL for a given link
    **/
    public function getUrl ($specdata) {
        // Method code goes here
    }
    
    /**
    * Get any extra html attributes to use for a given link
    **/
    public function getAttrs ($specdata) {
        // Method code goes here
    }
    
    /**
    * If there are any {@see Needs} calls that the edit form requires, they should be loaded here
    **/
    public function loadNeeds () {
        // Method code goes here
    }
    
    /**
    * Get the HTML to use for editing a given linkspec
    * 
    * The HTML should create a HTML field with the name $field_name
    * If there is a spec currently being edited, the specdata will
    * be provided in $curr_specdata
    **/
    public function getEditForm ($field_name, $curr_specdata) {
        // Method code goes here
    }
    
    /**
    * Validate the submission, for instances where certain constraints apply
    **/
    public function isValid ($specdata) {
        // Method code goes here
    }
    
}
?>