Amiro.CMS API Reference
Amiro.Ru / Manual
Loading search...

The AMI_ModDeclarator class

• Introduction

Module declarator.

• Class synopsis

AMI_ModDeclarator {
/* Constants */
// Flag specifying module has uncanonical table name
const AMI_ModDeclarator::HAS_UNCANONICAL_TABLE_NAME =  0x04;
const AMI_ModDeclarator::INTERFACE_ADMIN =  0x01;
const AMI_ModDeclarator::INTERFACE_FRONT =  0x02;
const AMI_ModDeclarator::INTERFACE_NONE =  0x00;
/* Methods */
// Returns an instance of AMI_ModDeclarator.
public static getInstance ( [ $aArgs = array() ] ) returns AMI_ModDeclarator;
// Drops registered module attribute.
public dropAttr ( string $modId, string $name ) returns bool;
// Returns registered module attribute.
public getAttr ( string $modId, string $name, [ mixed $defaultValue = null ] ) returns mixed;
// Return children module Ids for passed module.
public getChildren ( string $modId ) returns array;
// Returns hypermodule and config by module id.
public getHyperData ( string $modId ) returns array;
// Returns module Id by admin file name or null if no admin_link attribute was set.
public getModIdByLink ( string $modLink ) returns string;
// Returns AMI_Module.
public getModule ( string $modId ) returns AMI_Module;
// Returns parent module id by module id.
public getParent ( string $modId ) returns mixed;
// Sets module interface visibility.
public getRegistered ( [ mixed $hypermod = '' ], [ mixed $config = '' ], [ mixed $section = '' ], string $modId, int $flags ) returns void;
// Returns section by module id.
public getSection ( string $modId ) returns string;
// Returns sections.
public getSections ( ) returns array;
// Get all submodule Ids of specified module.
public getSubmodules ( string $parentModId ) returns array;
// Returns tab order by module id.
public getTabOrder ( string $modId ) returns string;
// Returns TRUE if module is registered.
public isRegistered ( string $modId ) returns bool;
// Returns TRUE if registered module attribute is present.
public issetAttr ( string $modId, string $name ) returns bool;
// Registers module in Amiro.CMS.
public register ( string $hypermod, string $config, string $modId, [ string $parentModId = '' ], [ int $flags = self::INTERFACE_ADMIN ] ) returns void;
// Sets registered module attribute.
public setAttr ( string $modId, string $name, mixed $value ) returns mixed;
// Starts each config declaration.
public startConfig ( string $section, [ string $tabOrder = '' ] ) returns void;
}
Tags:
since 5.14.4

• Class Constants

HAS_UNCANONICAL_TABLE_NAME

Flag specifying module has uncanonical table name

INTERFACE_ADMIN
INTERFACE_FRONT
INTERFACE_NONE

• Class Methods

// Returns an instance of AMI_ModDeclarator.
public static getInstance ( [ $aArgs = array() ] ) returns AMI_ModDeclarator;
  • array $aArgs
    Constructor arguments
// Drops registered module attribute.
public dropAttr ( string $modId, string $name ) returns bool;
  • string $modId
    Module id
  • string $name
    Attribute name
// Returns registered module attribute.
public getAttr ( string $modId, string $name, [ mixed $defaultValue = null ] ) returns mixed;
  • string $modId
    Module id
  • string $name
    Attribute name
  • mixed $defaultValue
    Default value to return
// Return children module Ids for passed module.
public getChildren ( string $modId ) returns array;
  • string $modId
    Module Id
Tags:
since 6.0.2
// Returns hypermodule and config by module id.
public getHyperData ( string $modId ) returns array;
  • string $modId
    Module id
  • string $modLink
    Admin script file name
// Returns AMI_Module.
public getModule ( string $modId ) returns AMI_Module;
  • string $modId
    Module id
// Returns parent module id by module id.
public getParent ( string $modId ) returns mixed;
  • string $modId
    Module id
// Sets module interface visibility.
public getRegistered ( [ mixed $hypermod = '' ], [ mixed $config = '' ], [ mixed $section = '' ], string $modId, int $flags ) returns void;
  • string $modId
    Module id
  • int $flags
    Flags: AMI_ModDeclarator::INTERFACE_*
// Returns section by module id.
public getSection ( string $modId ) returns string;
  • string $modId
    Module id
// Returns sections.
public getSections ( ) returns array;
Tags:
since 6.0.4
// Get all submodule Ids of specified module.
public getSubmodules ( string $parentModId ) returns array;
  • string $parentModId
    Parent modId
// Returns tab order by module id.
public getTabOrder ( string $modId ) returns string;
  • string $modId
    Module id
// Returns TRUE if module is registered.
public isRegistered ( string $modId ) returns bool;
  • string $modId
    Module id
// Returns TRUE if registered module attribute is present.
public issetAttr ( string $modId, string $name ) returns bool;
  • string $modId
    Module id
  • string $name
    Attribute name
// Registers module in Amiro.CMS.
public register ( string $hypermod, string $config, string $modId, [ string $parentModId = '' ], [ int $flags = self::INTERFACE_ADMIN ] ) returns void;
  • string $hypermod
    Hypermodule
  • string $config
    Configuration
  • string $modId
    Module id
  • string $parentModId
    Parent module id
  • int $flags
    Flags: self::INTERFACE_ADMIN - flag specifying that module has admin interface, self::INTERFACE_FRONT - flag specifying that module has front interface, self::SET_TABLE_NAME - flag specifying to use non-canonical table name, self::HAS_ASSOC_MODELS - flag specifying that module has associated models.
// Sets registered module attribute.
public setAttr ( string $modId, string $name, mixed $value ) returns mixed;
  • string $modId
    Module id
  • string $name
    Attribute name
  • mixed $value
    Attribute value
// Starts each config declaration.
public startConfig ( string $section, [ string $tabOrder = '' ] ) returns void;
  • string $section
    Section name
  • string $tabOrder
    Module tab order