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

The Pages_Table class

AMI_ModTable
   |
   --Pages_Table

• Introduction

Pages module table model.

• Class synopsis

Pages_Table extends AMI_ModTable {
/* Properties */
// Database table name
protected string $tableName = 'cms_pages';
/* Inherited Properties */
// Attributes
protected AMI_ModTable::$aAttributes = array();
// Flag specifying extensions are initialized already
protected AMI_ModTable::$extInitialized = array();
/* Methods */
// Initializing table data.
public __construct ( [ $aAttributes = array() ] ) returns Pages_Table;
/* Inherited Methods */
// Constructor.
public AMI_ModTable::__construct ( [ $aAttributes = array() ] ) returns AMI_ModTable;
// Returns item model object and add new data without saving.
public AMI_ModTable::add ( [ $aData = array() ] ) returns AMI_ModTableItem;
// Adds validators array for fields.
public AMI_ModTable::addValidators ( $aValidators ) returns AMI_ModTable;
// Drops attribute.
public AMI_ModTable::dropAttr ( string $name ) returns AMI_ModTable;
// Exludes fields not from available list.
public AMI_ModTable::filterFields ( $aFields ) returns array;
// Returns item model object and load data for key field param.
public AMI_ModTable::find ( int $id, [ $aFields = array('*') ] ) returns AMI_ModTableItem;
// Returns item model object and load data for non-primary key field.
public AMI_ModTable::findByFields ( $aSearchCondition, [ $aFields = array('*') ] ) returns AMI_ModTableItem;
// Returns attribute.
public AMI_ModTable::getAttr ( string $name, [ mixed $defaultValue = null ] ) returns mixed;
// Returns array of available fields.
public AMI_ModTable::getAvailableFields ( [ bool $bAppendEventFields = true ] ) returns array;
// Returns dependence resource name.
public AMI_ModTable::getDependenceResId ( string $alias ) returns string|null;
// Returns real field name by its alias.
public AMI_ModTable::getFieldName ( string $alias, [ string $prefix = '' ] ) returns string;
// Called when receive array of validators, allow add own validators.
public AMI_ModTable::getItem ( [ mixed $type = '' ] ) returns void;
// Returns list model object.
public AMI_ModTable::getList ( [ string $type = '' ] ) returns AMI_ModTableList;
// Returns next primary key field value.
public AMI_ModTable::getNextPKValue ( ) returns int|null;
// Event, called for add columns to the query result, a compound derived from the dependent model.
public AMI_ModTable::getQueryBase ( [ mixed $type = '' ], [ mixed $bJoinDependentTables = true ] ) returns void;
// Returns database table name.
public AMI_ModTable::getTableName ( ) returns string;
// Checks if model has a field.
public AMI_ModTable::hasField ( string $name, [ bool $bAppendEventFields = false ] ) returns bool;
// Returns TRUE if attribute is present.
public AMI_ModTable::issetAttr ( string $name ) returns bool;
// Activate or deactivate dependence for the next query.
public AMI_ModTable::setActiveDependence ( string $alias, [ bool $isActive = true ] ) returns mixed;
// Sets attribute.
public AMI_ModTable::setAttr ( string $name, mixed $value ) returns AMI_ModTable;
// Sets table dependences (from other table models for JOIN SQL part).
public AMI_ModTable::setDependence ( string $modId, string $alias, string $condition, [ string $joinType = 'INNER JOIN' ] ) returns void;
// Destructor.
public AMI_ModTable::__destruct ( ) returns void;
// Deinitialize extensions.
protected AMI_ModTable::cleanupExtensions ( ) returns void;
// Returns module id.
protected AMI_ModTable::getModId ( ) returns string;
// Sets passed attributes.
protected AMI_ModTable::initAttributes ( $aAttributes ) returns void;
// Initialize extensions for model.
protected AMI_ModTable::initExtensions ( ) returns void;
// Set pair tableName => moduleId to registry variable tableBlockNames. Used for cache expiring.
protected AMI_ModTable::storeTableBlockName ( ) returns void;
}

• Class Details

See AMI_ModTable::getAvailableFields() for common fields description.
Pages fields description:
  • id - page identifier (int),
  • id_parent - parent page id (int),
  • public - flag specifying front-side item displaying (0/1),
  • lang - item locale (string, 2-3 chars),
  • header - item header (string),
  • body - item body (string, since 7.0.0),
  • id_owner - owner user id (int),
  • date_modified - item modification date,
  • id_mod - page module name (string),
  • position - page position ion the range of siblings (int),
  • all_parents - comma separated parent page ids (string),
  • is_section - flag specifying if page is main for the section (0/1),
  • is_printable - flag specifying to allow print version of the page (0/1),
  • skip_search - flag specifying to don't use the page in search (0/1),
  • show_in_sitemap - flag specifying to show the page in sitemap (0/1),
  • show_at_parent - flag specifying to show link to this page on the parent page (0/1),
  • show_siblings - show links to sibling pages on the page (0/1),
  • menu_main - flag specifying to show the page in the main menu (0/1),
  • menu_top - flag specifying to show the page in the top menu (0/1),
  • menu_bottom - flag specifying to show the page in the bottom menu (0/1),
  • html_title_inherit - inherit HTML meta title from parent page (0/1),
  • html_title - HTML meta title (string),
  • html_keywords - Comma separated HTML meta keywords (string),
  • html_description - HTML meta description (string),
  • html_head_code - HTML head tag code (string, since 7.0.0),
  • noindex_link - flag specifying to do not allow to browse this link in menu for search engine robots (noindex, nofollow) (0/1),
  • noindex_page - flag specifying to do not allow to index page by search engine robots (0/1),
  • id_layout - layout Id (int, since 7.0.0),
  • lay_f1_body - lay_f10_body - layout blocks (string, since 7.0.0).
  • page_noindex - (0/1, since 7.0.0),
  • data - page data (array, since 7.0.0),
  • block_mask - layout blocks mask specifying protected blocks (array, since 7.0.0),
  • id_redirect - page id to redirect (array, since 7.0.0).
Tags:
todo Allow to create/update pages.
since 5.12.0
resource pages/table/model AMI::getResourceModel('pages/table')

• Class Properies

protected string $tableName

Database table name

• Class Methods

// Initializing table data.
public __construct ( [ $aAttributes = array() ] ) returns Pages_Table;
  • array $aAttributes
    Attributes of table model

Overrides: AMI_ModTable::__construct().

Tags:
todo Describe several fields