SproutCMS

This is the code documentation for the SproutCMS project

class Register

This will one day have methods for various different aspects of the cms
incl. widgets, search handlers, tabs, etc.
Dare to dream

Extending this class

<?php
/**
* New class description goes here
* 
* @author Your Name, 2026-08-16
**/
class NewClassName extends Register {
    
    /**
    * Return list of dbtool api tests
    **/
    public function getDbtoolsApi () {
        // Method code goes here
    }
    
    /**
    * Return list of SearchHandler objects
    **/
    public function getSearchHandlers () {
        // Method code goes here
    }
    
    /**
    * Register an API test form
    **/
    public function addDbtoolsApi (array $api) {
        // Method code goes here
    }
    
    /**
    * Register search handler
    **/
    public function searchHandler (string $class, string $table, array $where) {
        // Method code goes here
    }
    
    /**
    * Return a list of all display condition registrations
    **/
    public function getDisplayConditions () {
        // Method code goes here
    }
    
    /**
    * Registers a module's shorthand controller names for the admin controller
    **/
    public function adminControllers (string $namespace, array $controllers) {
        // Method code goes here
    }
    
    /**
    * Converts an shorthand admin controller name to its full class name,
    * including modular namespace
    **/
    public function getAdminController (string $shorthand) {
        // Method code goes here
    }
    
    /**
    * Gets the list of modular admin controllers with registered shorthands
    **/
    public function getAdminControllers () {
        // Method code goes here
    }
    
    /**
    * Register a type for an extra page
    **/
    public function extraPage ($name, $label) {
        // Method code goes here
    }
    
    /**
    * Get all extra pages
    **/
    public function getExtraPages () {
        // Method code goes here
    }
    
    /**
    * Register a type for an extra page
    **/
    public function pageattr (string $name, string $label, string $editor) {
        // Method code goes here
    }
    
    /**
    * Get all extra pages
    **/
    public function getPageattrs () {
        // Method code goes here
    }
    
    /**
    * Register a front-end controller (also called a tool page)
    **/
    public function frontEndController (string $name, string $label) {
        // Method code goes here
    }
    
    /**
    * Get all front-end controllers
    **/
    public function getFrontEndControllers () {
        // Method code goes here
    }
    
    /**
    * Register a LinkSpec
    **/
    public function linkspec ($name, $label) {
        // Method code goes here
    }
    
    /**
    * Get all `LinkSpec`s
    **/
    public function getLinkspecs () {
        // Method code goes here
    }
    
    /**
    * Register a DocImport class
    **/
    public function docImport ($ext, $class, $label) {
        // Method code goes here
    }
    
    /**
    * Get all `DocImport`s
    **/
    public function getDocImports () {
        // Method code goes here
    }
    
    /**
    * Register a RteLibrary class
    **/
    public function rteLibrary ($class_name) {
        // Method code goes here
    }
    
    /**
    * Get all `RteLibrary`s
    **/
    public function getRteLibraries () {
        // Method code goes here
    }
    
    /**
    * Register a sitemap.xml generator class
    **/
    public function sitemapGen ($class_name) {
        // Method code goes here
    }
    
    /**
    * Get a list of all sitemap.xml generator classes
    **/
    public function getSitemapGens () {
        // Method code goes here
    }
    
    /**
    * Register an email text
    **/
    public function emailText (string $code, array $field_defs, string $default_html_view) {
        // Method code goes here
    }
    
    /**
    * Get all registered email texts. Returns an array of EmailTextReg objects
    **/
    public function getEmailTexts () {
        // Method code goes here
    }
    
    /**
    * Get a single registered email texts. Returns an EmailTextReg object
    **/
    public function getEmailText ($code) {
        // Method code goes here
    }
    
    /**
    * Registers a list of modules
    **/
    public function modules (array $names) {
        // Method code goes here
    }
    
    /**
    * Registers a module
    **/
    public function module (string $name) {
        // Method code goes here
    }
    
    /**
    * Gets the list of active modules
    **/
    public function getModules () {
        // Method code goes here
    }
    
    /**
    * Gets a list of paths to the active modules
    **/
    public function getModuleDirs () {
        // Method code goes here
    }
    
    /**
    * Register the various &quot;content&quot; controllers which are provided by the SproutCMS core
    * This will allow these controllers to have permissions (e.g. per-tab or per-record)
    **/
    public function coreContentControllers () {
        // Method code goes here
    }
    
    /**
    * Register a display condition (this is part of the Context Engine on widgets)
    * 
    * Condition classes must extend the base class {@see Sprout\Helpers\DisplayConditions\DisplayCondition}
    **/
    public function displayCondition (string $class, string $group, string $label) {
        // Method code goes here
    }
    
    /**
    * Return all registered cron jobs
    **/
    public function getAllCronJobs () {
        // Method code goes here
    }
    
    /**
    * Register an helper to expose to twig templates via the 'sprout' namespace.
    **/
    public function templateVariable (string $name, mixed $item) {
        // Method code goes here
    }
    
    /**
    * Return the methods for a given cron job schedule
    **/
    public function getCronJobs (string $schedule) {
        // Method code goes here
    }
    
    /**
    * Register a method to be called for cron job processing
    * 
    * By default there is only one schedule, 'daily', but it's easy to add
    * another schedule by duplicating the cron_daily.sh file and making the new
    * file call the new schedule
    **/
    public function cronJob (string $schedule, string $class, string $func) {
        // Method code goes here
    }
    
    /**
    * Return the methods for a given content replace chain
    **/
    public function getContentReplaceMethods (string $chain) {
        // Method code goes here
    }
    
    /**
    * Is the given feature currently available?
    **/
    public function hasFeature (string $code) {
        // Method code goes here
    }
    
    /**
    * Return the namespace for a given feature
    **/
    public function getFeatureNamespace (string $code) {
        // Method code goes here
    }
    
    /**
    * Register a method for a content replacement chain
    * 
    * Registered method will receive one string argument and should return a string.
    * For the 'inner_html' chain, the input and output should be HTML
    * 
    * Common chains:
    *      inner_html      The &quot;inside&quot; HTML of widgets (richtext, blog content, etc)
    *      main_content    The main content of inner and wide templates
    **/
    public function contentReplace (string $chain, string $func) {
        // Method code goes here
    }
    
    /**
    * Register an available feature, and the root namespace where the helpers are found
    * 
    * Features allow the Sprout core to access code provided by modules without needing
    * to hard-code the namespace of these modules
    **/
    public function feature (string $code, string $namespace) {
        // Method code goes here
    }
    
    /**
    * Return an array of widget tiles for a given widget area
    * Each tile has four keys, 'name', 'icon', 'text', and 'widgets'.
    **/
    public function getWidgetTiles ($area_name) {
        // Method code goes here
    }
    
    /**
    * Register a &quot;tile&quot;, which is shown in the modules menu in the admin
    * 
    * A list of available icons can be found in the file {@see sprout/media/fonts/iconfont/demo.html}
    **/
    public function adminTile (string $name, string $icon, string $text, array $controllers, int $sort_order) {
        // Method code goes here
    }
    
    /**
    * Return an array of admin tiles.
    * Each tile has four keys, 'name', 'icon', 'text', and 'controllers'.
    **/
    public function getAdminTiles () {
        // Method code goes here
    }
    
    /**
    * Register a widget &quot;tile&quot;, which is shown when adding widgets (content blocks) to a page
    * 
    * If a tile already exists with that name, the widgets will be added to that tile
    * 
    * A list of available icons can be found in the file {@see sprout/media/fonts/iconfont/demo.html}
    **/
    public function widgetTile (string $area_name, string $name, string $icon, string $text, array $widgets) {
        // Method code goes here
    }
    
    /**
    * Register a moderation class
    **/
    public function moderator ($class_name) {
        // Method code goes here
    }
    
    /**
    * Get all moderation classes
    **/
    public function getModerators () {
        // Method code goes here
    }
    
}
?>