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

The AMI_iModTableList interface

• Introduction

Module component list model interface.

• Interface synopsis

AMI_iModTableList {
/* Methods */
// Sets the SQL_CALC_FOUND_ROWS selection flag.
public addCalcFoundRows ( ) returns this;
// Adds several columns at time for list selection.
public addColumns ( $aColumns, [ string $model = '' ] ) returns AMI_ModTableList;
// Adds order.
public addOrder ( string $field, [ string $direction = '' ] ) returns AMI_ModTableList;
// Exludes fields not from available list.
public filterFields ( $aFields ) returns array;
// Returns array of available fields.
public getAvailableFields ( [ bool $bAppendEventFields = true ] ) returns array;
// Get the number of found rows when bCalcFoundRows is true.
// Gets position of the applied element.
public getPosition ( string $fieldName, integer $appliedId, integer $position ) returns integer;
// Loads data from table and init recordset.
public load ( ) returns AMI_ModTableList;
// Sets limit parameters.
public setLimitParameters ( int $start, int $limit ) returns AMI_ModTableList;
}

• Interface Details

Use AMI_ModTableList children, interface usage will be described later.
Tags:
see AmiSample_TableList
since 5.10.0

• Interface Methods

// Sets the SQL_CALC_FOUND_ROWS selection flag.
public addCalcFoundRows ( ) returns this;
// Adds several columns at time for list selection.
public addColumns ( $aColumns, [ string $model = '' ] ) returns AMI_ModTableList;
  • array $aColumns
    Array of column field names, may be in format AMI_ModTable::getAvailableFields()
  • string $model
    Dependent model alias
// Adds order.
public addOrder ( string $field, [ string $direction = '' ] ) returns AMI_ModTableList;
  • string $field
    Field name
  • string $direction
    Order
// Exludes fields not from available list.
public filterFields ( $aFields ) returns array;
  • array $aFields
    Fields
Tags:
since 5.12.0
// Returns array of available fields.
public getAvailableFields ( [ bool $bAppendEventFields = true ] ) returns array;
  • bool $bAppendEventFields
    Fire 'on_get_available_fields' event to append extension fields
// Get the number of found rows when bCalcFoundRows is true.
// Gets position of the applied element.
public getPosition ( string $fieldName, integer $appliedId, integer $position ) returns integer;
  • string $fieldName
    Field name to search in
  • integer $appliedId
    Field value of the applied element
  • integer $position
    Initial position
// Loads data from table and init recordset.
public load ( ) returns AMI_ModTableList;
// Sets limit parameters.
public setLimitParameters ( int $start, int $limit ) returns AMI_ModTableList;
  • int $start
    Start
  • int $limit
    Limit