XMF Cookbook
  • Introduction
  • XMF Cookbook
  • Basic Ingredients
    • Namespaces
    • Autoloading
    • Debugging
    • Forward Compatibility
  • Recipes
    • Introducing Module Helpers
    • Using the Permission Helper
      • Checking Permissions
      • Managing Item Permissions
    • Using the Session Helper
    • Using JSON Web Tokens
    • Altering Database Tables
    • Migrating a Module's Database
    • Loading Initial Data
    • Module Admin Pages
      • Hide and Seek with Icons
      • Standard Admin Pages
    • Manage Metadata
    • Highlighting Content
  • Reference
    • Assert
      • Assertions
    • Database
      • Migrate
      • TableLoad
      • Tables
        • Getting Started
        • Table Operations
        • Working with Columns
        • Working with Indexes
        • Changing Table Data
        • Interacting with the Work Queue
        • Error Info and Debugging
    • Debug
    • FilterInput
    • Highlighter
    • IPAddress
    • Jwt
      • JsonWebToken
      • KeyFactory
      • TokenFactory
      • TokenReader
    • Key
      • ArrayStorage
      • Basic
      • FileStorage
      • KeyAbstract
      • StorageInterface
    • Language
    • Metagen
      • Extracting Data
      • Applying Data
    • Module
      • Admin
      • Helper
      • Helper
        • AbstractHelper
        • Cache
        • GenericHelper
        • Permission
        • Session
    • ProxyCheck
    • Random
    • Request
    • StopWords
    • Uuid
    • Yaml
  • Credits
  • License:
  • Table of Content
Powered by GitBook
On this page
  • __construct($dirname)
  • init()
  • dirname()
  • setDebug($bool)
  • addLog($log)
  1. Reference
  2. Module
  3. Helper

AbstractHelper

The Xmf\Module\Helper\AbstractHelper abstract class is the base class for module aware helpers.

__construct($dirname)

Instantiate a XoopsModule object for the helper to use. If the string $dirname is empty, the current module in XOOPS will be user. Otherwise, it will attempt to load the module by name.

init()

init() is called by the constructor after the appropriate XoopsModule object is loaded.

dirname()

Returns the module dirname associated with the helper.

setDebug($bool)

Set debug option for the helper on (true) or off (false.) The default for $bool, if not specified, is true.

addLog($log)

Add the message string $log to the module log.

PreviousHelperNextCache

Last updated 6 years ago