Amiro.Ru / Manual | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Packages:
DB Debug Driver_PaymentSystem Environment Library Module ModuleComponent Package Plugin Plugin_AJAXResponder Plugin_Sample Service Template TxCommand TxService Hyper_AmiCatalog Hyper_AmiClean Hyper_AmiEshopShipping Hyper_AmiExt Hyper_AmiFiles Hyper_AmiMultifeeds Hyper_AmiSearch Hyper_AmiUsers Config_AmiCatalog_Items Config_AmiClean_AmiNewsList Config_AmiClean_AmiSample Config_AmiClean_EshopOrder Config_AmiClean_Sape Config_AmiClean_Trustlink Config_AmiClean_Webservice Config_AmiEshopShipping_Fields Config_AmiEshopShipping_Methods Config_AmiEshopShipping_Types Config_AmiFake_AmiroPayDrvExample Config_AmiFiles_Files Config_AmiMultifeeds_Articles Config_AmiMultifeeds_Blog Config_AmiMultifeeds_FAQ Config_AmiMultifeeds_News Config_AmiMultifeeds_Photoalbum Config_AmiMultifeeds_PhotoGallery Config_AmiMultifeeds_Stickers Config_AmiUsers_Users Module_Catalog Module_Pages Module_Sample Module_SearchHistory
Interfaces:
Classes:
Model
AMI_ArrayIterator AMI_ArrayIteratorItem AMI_ArrayIteratorList AMI_CatModTable AMI_CatModTableItem AMI_CatModTableList AMI_CatModule_FilterModelAdm AMI_CatModule_TableItemModifier AMI_Filter AMI_ModSpecblock_ArrayIterator AMI_ModSpecblock_ArrayIteratorItem AMI_ModSpecblock_ArrayIteratorList AMI_ModTable AMI_ModTableItem AMI_ModTableItemException AMI_ModTableItemMeta AMI_ModTableItemModifier AMI_ModTableList AMI_Module_FilterModelAdm AMI_Module_TableItem AMI_Module_TableItemModifier
Controller
AMI_CatModule_FilterAdm AMI_CatModule_FormAdm AMI_CatModule_ListActionsAdm AMI_CatModule_ListAdm AMI_CatModule_ListGroupActionsAdm AMI_CustomComponent AMI_ModCatsFrn AMI_ModComponent AMI_ModDetails AMI_ModEmptyFrn AMI_ModEmptyView AMI_ModFilter AMI_ModFilterAdm AMI_ModForm AMI_ModFormAdm AMI_ModItemsFrn AMI_ModList AMI_ModListActions AMI_ModListAdm AMI_ModListAdmCommon AMI_ModListGroupActions AMI_ModSpecblock AMI_ModSpecblockList AMI_Module_FilterAdm AMI_Module_FormAdm AMI_Module_ListActionsAdm AMI_Module_ListAdm AMI_Module_ListGroupActionsAdm
View
AMI_CatModule_FilterViewAdm AMI_CatModule_FormViewAdm AMI_CatModule_ListViewAdm AMI_CustomComponentView AMI_ModCatsView AMI_ModCommonViewFrn AMI_ModDetailsView AMI_ModFilterView AMI_ModFilterViewAdm AMI_ModFormView AMI_ModFormViewAdm AMI_ModFormViewFrn AMI_ModItemsView AMI_ModListView AMI_ModListView_JSON AMI_ModPlaceholderView AMI_ModSpecblockListView AMI_ModSubitemsView AMI_Module_FilterViewAdm AMI_Module_FormViewAdm AMI_Module_ListViewAdm AMI_View AMI_ViewEmpty |
Loading search... The AMI_ModTable class• IntroductionModule table model. • Class synopsis
AMI_ModTable
implements AMI_iModTable
{
/* Properties */
// Flag specifying extensions are initialized already
// Attributes
// Database table name, must be declared in child classes
/* Methods */
// Constructor.
// Destructor.
// Returns item model object and add new data without saving.
// Adds validators array for fields.
// Drops attribute.
// Exludes fields not from available list.
// Returns item model object and load data for key field param.
// Returns item model object and load data for non-primary key field.
// Returns attribute.
// Returns array of available fields.
// Returns dependence resource name.
// Returns real field name by its alias.
// Called when receive array of validators, allow add own validators.
// Returns list model object.
// Returns next primary key field value.
// Event, called for add columns to the query result, a compound derived from the dependent model.
// Returns database table name.
// Checks if model has a field.
// Returns TRUE if attribute is present.
// Activate or deactivate dependence for the next query.
// Sets attribute.
// Sets table dependences (from other table models for JOIN SQL part).
public
setDependence ( string $modId, string $alias, string $condition, [ string $joinType = 'INNER JOIN' ] ) returns void;
// Deinitialize extensions.
// Returns module id.
// Sets passed attributes.
// Initialize extensions for model.
// Set pair tableName => moduleId to registry variable tableBlockNames. Used for cache expiring.
}
• Class DetailsModule table models have high abstraction level, modules ids are obtained from resource ids or class names by default. Since 6.0.2 you can pass following attributes to model constructor:
Tags:
• Class Properies
• Class Methods// Constructor.
Overridden in child classes as: AMI_CatModTable::__construct(), AmiCatalog_ItemsCat_Table::__construct(), Hyper_AmiFiles_Cat_Table::__construct(), AmiFiles_FilesCat_Table::__construct(), AmiMultifeeds_ArticlesCat_Table::__construct(), AmiMultifeeds_BlogCat_Table::__construct(), AmiMultifeeds_FaqCat_Table::__construct(), AmiMultifeeds_NewsCat_Table::__construct(), AmiMultifeeds_PhotoalbumCat_Table::__construct(), AmiMultifeeds_StickersCat_Table::__construct(), EshopItemProps_Table::__construct(), EshopOrderItem_Table::__construct(), KbItemProps_Table::__construct(), Pages_Table::__construct(), PaymentDrivers_Table::__construct(), PortfolioItemProps_Table::__construct(), SearchHistory_Table::__construct(), Session_Table::__construct(), AmiCatalog_Items_Table::__construct(), AmiClean_EshopOrder_Table::__construct(), AmiClean_Webservice_Table::__construct(), AmiEshopShipping_Fields_Table::__construct(), AmiEshopShipping_Methods_Table::__construct(), AmiEshopShipping_Types_Table::__construct(), AmiFiles_Files_Table::__construct(), AmiMultifeeds_Articles_Table::__construct(), AmiMultifeeds_Blog_Table::__construct(), AmiMultifeeds_Faq_Table::__construct(), AmiMultifeeds_News_Table::__construct(), AmiMultifeeds_Photoalbum_Table::__construct(), AmiMultifeeds_Stickers_Table::__construct(), AmiUsers_Users_Table::__construct(), AmiClean_AmiSample_Table::__construct(). Initializing table data (describe, field rules).
// Destructor.
Tags:
// Returns item model object and add new data without saving.
// Adds validators array for fields.
Model automatically validates fields in terms of database fields description for following types: 'int', 'float', 'double', 'char', 'varchar', 'tinytext', 'text', 'mediumtext', 'tinyblob', 'blob', 'mediumblob', 'datetime', 'date', 'time'. There are predifined system validators, other validators are custom and can be descibe by developers:
// Drops attribute.
Tags:
// Exludes fields not from available list.
Tags:
// Returns item model object and load data for key field param.
Implementation of: AMI_iModTable::find(). Tags:
// Returns item model object and load data for non-primary key field.
Implementation of: AMI_iModTable::findByFields(). // Returns attribute.
Tags:
// Returns array of available fields.
Implementation of: AMI_iModTable::getAvailableFields(). Overridden in child classes as: AmiUsers_Users_Table::getAvailableFields(). Dependend model fields returns model alias as index and array of its fields as value. Example: will contain: array( 0 => 'announce', 1 => 'body', .... 'cat' => array( 0 => 'id', 1 => 'header', ... ) Common possible fields description:
you can specify following Images extension options in fast environment context. These options can be changed from module options interface at "Extension Images" section. Usage example:
Common Ratings extension fields description:
Common Categories extension fields description (array key will be category model alias, cat as usual).
Tags:
// Returns dependence resource name.
// Returns real field name by its alias.
See PlgAJAXResp::__construct() for usage example.
Tags:
// Called when receive array of validators, allow add own validators.
Implementation of: AMI_iModTable::getItem(). // Returns list model object.
Implementation of: AMI_iModTable::getList(). // Returns next primary key field value.
Tags:
// Event, called for add columns to the query result, a compound derived from the dependent model.
// Returns database table name.
// Checks if model has a field.
Implementation of: AMI_iModTable::hasField(). See PlgAJAXResp::initModel() for usage example.
Tags:
// Returns TRUE if attribute is present.
Tags:
// Activate or deactivate dependence for the next query.
// Sets attribute.
Tags:
// Sets table dependences (from other table models for JOIN SQL part).
public
setDependence ( string $modId, string $alias, string $condition, [ string $joinType = 'INNER JOIN' ] ) returns void;
Since 5.12.8 this method scope is changed from protected to public.
Example:
// Deinitialize extensions.
Tags:
// Returns module id.
// Sets passed attributes.
Tags:
// Initialize extensions for model.
Tags:
// Set pair tableName => moduleId to registry variable tableBlockNames. Used for cache expiring.
|