Docs For Class atkOneToManyRelation
Atk API home Class tree Element index

Todo list

Packages: » atk Classes: general » AllTests » atkConfig » atkController » atkDataNode » atkErrorHandlerBase » atkFileEditor » atkLanguage » atkMailErrorHandler » atkMetaNode » atkMockNode » atkNode » atkNodeValidator » atkOneToManyRelationSessionGridHandler » atkPHPView » atkSessionStore » atkStatementIterator » atkTreeNode » atkWizardBase » atkZendPlatformErrorHandler » clsTbsDataSource » clsTbsLocator » clsTinyButStrong » clsTinyButStrongOOo » FCKeditor » getSupportedLanguagesCollector » layout » node » sql_whereclause_blacklist_checker » test » tree utils » atkAbstractFrame » atkActionListener » atkClassFinder » atkClassLoader » atkCompatSelector » atkDataHolder » atkDebugger » atkDirectoryTraverser » atkEventLog » atkFileUtils » atkFrame » atkFrameSet » atkIpUtils » atkJSON » atkMail » atkMailer » atkMessageQueue » atkMLSelector » atkmlsplitter » atkRootFrameset » atkSelector » atkSelectorIterator » atkString » atkStringParser » atkTableRenderer » atkTableRendererGrouped » atkTextMarker » atkTmpFile » atkTriggerListener » atkYAML » atkZip » browserInfo fixture » atkAbstractFixtureLoader » atkFixtureManager » atkPHPFixtureLoader » atkYAMLFixtureLoader testcases » atkAbstractSearchHandler ui » atkActionBoxBuilder » atkDialog » atkIndexPage » atkOutput » atkPage » atkPageBuilder » atkTheme » atkThemeCompiler » atkUI handlers » atkActionHandler » atkAddHandler » atkAddOrCopyHandler » atkAdminHandler » atkAttributeEditHandler » atkCopyHandler » atkDeleteHandler » atkDocumentHandler » atkEditCopyHandler » atkEditHandler » atkExportHandler » atkFeedbackHandler » atkFileExport » atkImportHandler » atkMultiSelectHandler » atkMultiUpdatehandler » atkSaveHandler » atkSearchHandler » atkSelectHandler » atkSmartSearchHandler » atkUpdatehandler » atkViewEditBase » atkViewHandler » atkXmlHandler attributes » atkAggregatedColumn » atkAttribute » atkBoolAttribute » atkCalculatorAttribute » atkCaptchaAttribute » atkColorPickerAttribute » atkCountryAttribute » atkCreatedByAttribute » atkCreateStampAttribute » atkCurrencyAttribute » atkDateAttribute » atkDateTimeAttribute » atkDocumentAttribute » atkDummyAttribute » atkDurationAttribute » atkEmailAttribute » atkExpressionAttribute » atkFckAttribute » atkFieldSet » atkFileAttribute » atkFileWriterAttribute » atkFlagAttribute » atkFormatAttribute » atkFuzzySearchAttribute » atkHiddenAttribute » atkHtmlAttribute » atkIpAttribute » atkListAttribute » atkLiveTextPreview » atkMlAttribute » atkMlFckAttribute » atkMlHtmlAttribute » atkMlNumberAttribute » atkMlSelectorAttribute » atkMlTextAttribute » atkMlWrapper » atkMultipleFileAttribute » atkMultiSelectAttribute » atkNumberAttribute » atkParserAttribute » atkPasswordAttribute » atkProfileAttribute » atkRadioAttribute » atkRadioDetailsAttribute » atkRowCounter » atkStateAttribute » atkTabbedPane » atkTagAttribute » atkTextAttribute » atkTimeAttribute » atkTimeZoneAttribute » atkToolbar » atkUpdatedByAttribute » atkUpdateStampAttribute » atkUrlAttribute » atkWeekdayAttribute » atkWysiwygAttribute datatypes » atkArrayDt » atkDataType » atkStringDt » atkTime subpackage » atkAttributeTestCase security » atkBajusEncryption » atkBase64Encryption » atkEncryption » atkMockSecurityManager » atkOpenSSLEncryption » atkSecurityListener » atkSecurityManager » atkUrlVault » auth_config » auth_db » auth_imap » auth_interface » auth_ldap » auth_none » auth_pop3 » auth_saml » auth_server » auth_sspi cache » atkCache » atkCache_apc » atkCache_eaccelerator » atkCache_file » atkCache_memcache » atkCache_var » atkCache_xcache » atkCache_zp_disk » atkCache_zp_output » atkCache_zp_shm test » atkCacheTestCase » atkPluginTestCase » atkTestCase » test_sql_whereclause_blacklist_checker db » atkClusterDb » atkClusterDDL » atkClusterQuery » atkDb » atkdb2db » atkDb2DDL » atkDb2Query » atkDDL » atki5db » atki5DDL » atki5query » atkMockDb » atkMockDDL » atkMockQuery » atkMsSqlDb » atkMsSqlDDL » atkMssqlQuery » atkMysqlDb » atkMysqlDDL » atkMysqliDb » atkMysqliDDL » atkMysqliQuery » atkMysqlQuery » atkOci8Db » atkOci8DDL » atkOci8Query » atkOci9Db » atkOci9DDL » atkOci9Query » atkOci805Db » atkOci805Query » atkPgsqlDb » atkPgsqlDDL » atkPgsqlQuery » atkQuery recordlist » atkColumnConfig » atkCSVRecordList » atkCustomRecordList » atkExcelCSVRecordList » atkHTMLRecordList » atkPrintableRecordList » atkRecordList » atkRecordlistCache » atkTotalizer db-statement » atkCompatStatement » atkMySQLiStatement » atkStatement » atkStatementException » atkStatementParser console » atkConsoleController menu » atkcookmenu » atkDhtmlMenu » atkDropdownMenu » atkFramesMenu » atkMenu » atkmenuinterface » atkModernMenu » atkOutlookMenu » atkPlainMenu datagrid » atkDataGrid » atkDGComponent » atkDGEditControl » atkDGEvent » atkDGIndex » atkDGLimit » atkDGList » atkDGNoRecordsFound » atkDGPaginator » atkDGRenderer » atkDGSummary lock » atkDbLock » atkLock filters » atkDistinctFilter » atkFilter » atkGroupByFilter document » atkDocumentWriter » atkDocxWriter » atkOpenDocumentWriter meta » atkDutchMetaGrammar » atkMetaAttributeModifier » atkMetaCompiler » atkMetaGrammar » atkMetaPolicy » mod_meta relations » atkExtendableShuttleRelation » atkManyBoolRelation » atkManyToManyListRelation » atkManyToManyRelation » atkManyToManySelectRelation » atkManyToOneRelation » atkManyToOneTreeRelation » atkMatrixRelation » atkOneToManyRelation » atkOneToOneRelation » atkPolymorphicOneToOneRelation » atkRelation » atkSecureRelation » atkShuttleControl » atkShuttleFilter » atkShuttleRelation front » atkFrontController » atkFrontControllerBridge keyboard » atkKeyboard meta-relations » atkMetaExtendableShuttleRelation » atkMetaManyBoolRelation » atkMetaManyToManyListRelation » atkMetaManyToManySelectRelation » atkMetaManyToOneRelation » atkMetaOneToManyRelation » atkMetaOneToOneRelation » atkMetaShuttleRelation session » atkMockSessionManager » atkSessionManager » atkState modules » atkModule » mod_test listeners » atkRecycleBin interface » atkServer » atkSoapServer wizard » atkWizard » AtkWizardActionLoader » atkWizardPanel
Interfaces: datagrid » atkDGListener interface » atkServerInterface
Files: general » adodb-time.inc.php » AllTests.php » atknodetools.inc » atktools.inc » atktreetools.inc » basexml.php » bootstrap.inc » bootstrap.php » class.atkconfig.inc » class.atkcontroller.inc » class.atkdatanode.inc » class.atkerrorhandlerbase.inc » class.atkfileeditor.inc » class.atki5db.inc » class.atki5ddl.inc » class.atki5query.inc » class.atklanguage.inc » class.atkmailerrorhandler.inc » class.atkmetanode.inc » class.atkmocknode.inc » class.atkmocksessionmanager.inc » class.atknode.inc » class.atknodevalidator.inc » class.atkonetomanyrelationsessiongridhandler.inc » class.atkphpview.inc » class.atkpolymorphiconetoonerelation.inc » class.atksessionstore.inc » class.atkstatementiterator.inc » class.atktreenode.inc » class.atkwizardbase.inc » class.atkzendplatformerrorhandler.inc » class.layout.inc » class.nodename.inc » class.sql_whereclause_blacklist_checker.inc » class.test.inc » class.test_sql_whereclause_blacklist_checker.inc » commands.php » config.modules.inc » config.php » connector.php » console.php » db2yaml.php » defaultconfig.inc.php » fckeditor.php » fckeditor_php4.php » fckeditor_php5.php » io.php » module.inc » phpcompat.php » server.php » spellchecker.php » table2yaml.php » tbsooo_class.php » tbs_class.php » tooltip.tpl.php » upload.php » util.php » version.inc attributes » class.atkaggregatedcolumn.inc » class.atkattribute.inc » class.atkboolattribute.inc » class.atkcalculatorattribute.inc » class.atkcaptchaattribute.inc » class.atkcolorpickerattribute.inc » class.atkcountryattribute.inc » class.atkcreatedbyattribute.inc » class.atkcreatestampattribute.inc » class.atkcurrencyattribute.inc » class.atkdateattribute.inc » class.atkdatetimeattribute.inc » class.atkdocumentattribute.inc » class.atkdummyattribute.inc » class.atkdurationattribute.inc » class.atkemailattribute.inc » class.atkexpressionattribute.inc » class.atkfckattribute.inc » class.atkfieldset.inc » class.atkfileattribute.inc » class.atkfilewriterattribute.inc » class.atkflagattribute.inc » class.atkformatattribute.inc » class.atkfuzzysearchattribute.inc » class.atkhiddenattribute.inc » class.atkhtmlattribute.inc » class.atkipattribute.inc » class.atklistattribute.inc » class.atklivetextpreview.inc » class.atkmlattribute.inc » class.atkmlfckattribute.inc » class.atkmlhtmlattribute.inc » class.atkmlnumberattribute.inc » class.atkmlselectorattribute.inc » class.atkmltextattribute.inc » class.atkmlwrapper.inc » class.atkmultiplefileattribute.inc » class.atkmultiselectattribute.inc » class.atknumberattribute.inc » class.atkparserattribute.inc » class.atkpasswordattribute.inc » class.atkprofileattribute.inc » class.atkradioattribute.inc » class.atkradiodetailsattribute.inc » class.atkrowcounter.inc » class.atkstateattribute.inc » class.atktabbedpane.inc » class.atktagattribute.inc » class.atktextattribute.inc » class.atktimeattribute.inc » class.atktimezoneattribute.inc » class.atktoolbar.inc » class.atkupdatedbyattribute.inc » class.atkupdatestampattribute.inc » class.atkurlattribute.inc » class.atkweekdayattribute.inc » class.atkwysiwygattribute.inc attributes-- » property_accessor.php cache » class.atkcache.inc » class.atkcache_apc.inc » class.atkcache_eaccelerator.inc » class.atkcache_file.inc » class.atkcache_memcache.inc » class.atkcache_var.inc » class.atkcache_xcache.inc » class.atkcache_zp_disk.inc » class.atkcache_zp_output.inc » class.atkcache_zp_shm.inc console » class.atkconsolecontroller.inc datagrid » class.atkdatagrid.inc » class.atkdgcomponent.inc » class.atkdgeditcontrol.inc » class.atkdgevent.inc » class.atkdgindex.inc » class.atkdglimit.inc » class.atkdglist.inc » class.atkdglistener.inc » class.atkdgnorecordsfound.inc » class.atkdgpaginator.inc » class.atkdgrenderer.inc » class.atkdgsummary.inc datatypes » class.atkarraydt.inc » class.atkdatatype.inc » class.atkstringdt.inc » class.atktimedt.inc db » class.atkclusterdb.inc » class.atkclusterddl.inc » class.atkclusterquery.inc » class.atkdb.inc » class.atkdb2db.inc » class.atkdb2ddl.inc » class.atkdb2query.inc » class.atkddl.inc » class.atkmockdb.inc » class.atkmockddl.inc » class.atkmockquery.inc » class.atkmssqldb.inc » class.atkmssqlddl.inc » class.atkmssqlquery.inc » class.atkmysqldb.inc » class.atkmysqlddl.inc » class.atkmysqlidb.inc » class.atkmysqliddl.inc » class.atkmysqliquery.inc » class.atkmysqlquery.inc » class.atkoci8db.inc » class.atkoci8ddl.inc » class.atkoci8query.inc » class.atkoci9db.inc » class.atkoci9ddl.inc » class.atkoci9query.inc » class.atkoci805db.inc » class.atkoci805query.inc » class.atkpgsqldb.inc » class.atkpgsqlddl.inc » class.atkpgsqlquery.inc » class.atkquery.inc db-statement » class.atkcompatstatement.inc » class.atkmysqlistatement.inc » class.atkstatement.inc » class.atkstatementexception.inc » class.atkstatementparser.inc document » class.atkdocumentwriter.inc » class.atkdocxwriter.inc » class.atkopendocumentwriter.inc filters » class.atkdistinctfilter.inc » class.atkfilter.inc » class.atkgroupbyfilter.inc fixture » class.atkabstractfixtureloader.inc » class.atkfixturemanager.inc » class.atkphpfixtureloader.inc » class.atkyamlfixtureloader.inc front » class.atkfrontcontroller.inc » class.atkfrontcontrollerbridge.inc handlers » class.atkactionhandler.inc » class.atkaddhandler.inc » class.atkaddorcopyhandler.inc » class.atkadminhandler.inc » class.atkattributeedithandler.inc » class.atkcopyhandler.inc » class.atkdeletehandler.inc » class.atkdocumenthandler.inc » class.atkeditcopyhandler.inc » class.atkedithandler.inc » class.atkexporthandler.inc » class.atkfeedbackhandler.inc » class.atkfileexport.inc » class.atkimporthandler.inc » class.atkmultiselecthandler.inc » class.atkmultiupdatehandler.inc » class.atksavehandler.inc » class.atksearchhandler.inc » class.atkselecthandler.inc » class.atksmartsearchhandler.inc » class.atkupdatehandler.inc » class.atkvieweditbase.inc » class.atkviewhandler.inc » class.atkxmlhandler.inc include » autoload.inc » basics.inc » compatibility.inc » configs.inc » debugging.inc » errorhandler.inc » globals.inc » initial.inc » security.inc interface » class.atkserver.inc » class.atksoapserver.inc » interface.atkserverinterface.inc javascript » class.atkmultilanguage.js.php » class.atkprofileattribute.js.php » dhtml_tabs.js.php keyboard » class.atkkeyboard.inc listeners » class.atkrecyclebin.inc lock » class.atkdblock.inc » class.atklock.inc » lock.php lock-- » lock.js.php menu » atkmenutools.inc » class.atkcookmenu.inc » class.atkdhtmlmenu.inc » class.atkdropdownmenu.inc » class.atkframesmenu.inc » class.atkmenu.inc » class.atkmenuinterface.inc » class.atkmodernmenu.inc » class.atkoutlookmenu.inc » class.atkplainmenu.inc meta » class.atkdutchmetagrammar.inc » class.atkmetaattributemodifier.inc » class.atkmetacompiler.inc » class.atkmetagrammar.inc » class.atkmetapolicy.inc » module.inc meta-relations » class.atkmetaextendableshuttlerelation.inc » class.atkmetamanyboolrelation.inc » class.atkmetamanytomanylistrelation.inc » class.atkmetamanytomanyselectrelation.inc » class.atkmetamanytoonerelation.inc » class.atkmetaonetomanyrelation.inc » class.atkmetaonetoonerelation.inc » class.atkmetashuttlerelation.inc modules » class.atkmodule.inc modules-- » atkmoduletools.inc popups » colorpicker.inc recordlist » class.atkcolumnconfig.inc » class.atkcsvrecordlist.inc » class.atkcustomrecordlist.inc » class.atkexcelcsvrecordlist.inc » class.atkhtmlrecordlist.inc » class.atkprintablerecordlist.inc » class.atkrecordlist.inc » class.atkrecordlistcache.inc » class.atktotalizer.inc relations » class.atkextendableshuttlerelation.inc » class.atkmanyboolrelation.inc » class.atkmanytomanylistrelation.inc » class.atkmanytomanyrelation.inc » class.atkmanytomanyselectrelation.inc » class.atkmanytoonerelation.inc » class.atkmanytoonetreerelation.inc » class.atkmatrixrelation.inc » class.atkonetomanyrelation.inc » class.atkonetoonerelation.inc » class.atkrelation.inc » class.atksecurerelation.inc » class.atkshuttlecontrol.inc » class.atkshuttlefilter.inc » class.atkshuttlerelation.inc security » class.atkbajusencryption.inc » class.atkbase64encryption.inc » class.atkencryption.inc » class.atkmocksecuritymanager.inc » class.atkmocksecuritymanager.inc » class.atkopensslencryption.inc » class.atksecuritylistener.inc » class.atksecuritymanager.inc » class.atkurlvault.inc » class.auth_config.inc » class.auth_db.inc » class.auth_imap.inc » class.auth_interface.inc » class.auth_ldap.inc » class.auth_none.inc » class.auth_pop3.inc » class.auth_saml.inc » class.auth_server.inc » class.auth_sspi.inc session » class.atksessionmanager.inc » class.atkstate.inc skel » app.php » atk.inc » config.inc.php » debugger.php » dispatch.php » include.php » index.php » menu.php » top.php » welcome.php subpackage » class.atkattributetestcase.inc test » class.atkcachetestcase.inc » class.atkplugintestcase.inc » class.atktestcase.inc testcases » class.atkabstractsearchhandler.inc themes » themedef.inc » themedef.inc » themedef.inc » themedef.inc » themedef.inc » themedef.inc » themedef.inc » themedef.inc » themedef.inc » themedef.inc » themedef.inc » themedef.inc ui » block.atknavigator.php » block.atknavigatorinfo.php » class.atkactionboxbuilder.inc » class.atkdialog.inc » class.atkindexpage.inc » class.atkoutput.inc » class.atkpage.inc » class.atkpagebuilder.inc » class.atktheme.inc » class.atkthemecompiler.inc » class.atkui.inc » function.atkconf.php » function.atkconfig.php » function.atkdatefield.php » function.atkdispatchfile.php » function.atkfrontcontroller.php » function.atkloadscript.php » function.atkmessages.php » function.atkmoduledir.php » function.atkscript.php » function.atkstyle.php » function.atktext.php » function.atkthemeicon.php » function.atkthemeimg.php » function.stacktrace.php » modifier.atkjson.php » modifier.atkvardump.php » resource.string.php » resource.theme.php » resource.ui.php utils » atkbrowsertools.inc » class.atkactionlistener.inc » class.atkclassloader.inc » class.atkcompatselector.inc » class.atkdataholder.inc » class.atkdebugger.inc » class.atkdirectorytraverser.inc » class.atkeventlog.inc » class.atkfileutils.inc » class.atkframeset.inc » class.atkiputils.inc » class.atkjson.inc » class.atkmail.inc » class.atkmailer.inc » class.atkmessagequeue.inc » class.atkmlselector.inc » class.atkmlsplitter.inc » class.atkselector.inc » class.atkselectoriterator.inc » class.atkstring.inc » class.atkstringparser.inc » class.atktablerenderer.inc » class.atktablerenderergrouped.inc » class.atktextmarker.inc » class.atktmpfile.inc » class.atktriggerlistener.inc » class.atkyaml.inc » class.atkzip.inc » help.inc wizard » class.atkwizard.inc » class.atkwizardactionloader.inc » class.atkwizardpanel.inc
Home  ->  Documentation home  ->  Atk index  ->  Docs For Class atkOneToManyRelation [ package: atk ]

Class: atkOneToManyRelation

Source Location: /relations/class.atkonetomanyrelation.inc

Class atkOneToManyRelation

Class Overview

Implementation of one-to-many relationships.

Can be used to create one to many relations ('1 library has N books'). A common term for this type of relation is a master-detail relationship. The detailrecords can be edited inline.

Located in /relations/class.atkonetomanyrelation.inc [line 71]

Wiki documentation

atkAttribute
   |
   --atkRelation
      |
      --atkOneToManyRelation
Author(s): Information Tags:

Properties

Methods

[ Top ]

Descendants

Child Class Description
atkMetaOneToManyRelation Implementation of one-to-many relationships for meta nodes.

[ Top ]

Inherited from parent

Inherited Properties Inherited Methods

Inherited From atkRelation

atkRelation::$m_descHandler
atkRelation::$m_descTemplate
atkRelation::$m_destination
atkRelation::$m_destinationFilter
atkRelation::$m_destInstance

Inherited From atkAttribute

atkAttribute::$m_column
atkAttribute::$m_cssclasses
atkAttribute::$m_dbfieldtype
atkAttribute::$m_dependencies
atkAttribute::$m_disabledModes
atkAttribute::$m_editCallback
atkAttribute::$m_flags
atkAttribute::$m_forceinsert
atkAttribute::$m_forcereload
atkAttribute::$m_forceupdate
atkAttribute::$m_htmlid
atkAttribute::$m_index
atkAttribute::$m_initialValue
atkAttribute::$m_initial_hidden
atkAttribute::$m_jsObservers
atkAttribute::$m_label
atkAttribute::$m_loadType
atkAttribute::$m_maxsize
atkAttribute::$m_module
atkAttribute::$m_name
atkAttribute::$m_onchangecode
atkAttribute::$m_onchangehandler_init
atkAttribute::$m_order
atkAttribute::$m_owner
atkAttribute::$m_ownerInstance
atkAttribute::$m_postfixlabel
atkAttribute::$m_searchmode
atkAttribute::$m_searchsize
atkAttribute::$m_sections
atkAttribute::$m_size
atkAttribute::$m_storageType
atkAttribute::$m_tabs
atkAttribute::$m_viewCallback

Inherited From atkRelation

atkRelation::atkRelation()
Constructor
atkRelation::addDestinationFilter()
Adds a filter value to the destination filter.
atkRelation::createDestination()
Create the instance of the destination.
atkRelation::dbFieldType()
Since most relations do not store anything in a field, the default fieldtype for relations is "". Exceptions (like the many2oone relation, which stores a foreign key) can implement their own dbFieldType().
atkRelation::descriptor()
Descriptor handler. Forwards description handler calls to the real description handler.
atkRelation::display()
Return a displayable string for a record.
atkRelation::getAddLabel()
Attempts to get a translated label which can be used when composing an "add" link
atkRelation::getChildSearchMode()
Get the searchmode for nested/child attributes.
atkRelation::getDescriptorHandler()
Get descriptor handler.
atkRelation::getDescriptorTemplate()
Returns the descriptor template for the destination node.
atkRelation::getDestination()
Returns an instance of the node that the relation points to.
atkRelation::getDestinationFilter()
Returns the destination filter.
atkRelation::getJoinCondition()
Returns the condition (SQL) that should be used when we want to join a relation's owner node with the parent node.
atkRelation::getSearchModes()
Retrieve the searchmodes supported by the relation.
atkRelation::isEmpty()
Check if the relation is empty
atkRelation::parseFilter()
Parses the destination filter
atkRelation::setDescriptorHandler()
Set descriptor handler.
atkRelation::setDescriptorTemplate()
Sets the descriptor template for the destination node.
atkRelation::setDestinationFilter()
Sets the destination filter.
atkRelation::validate()
Validation method. Empty implementation. Derived classes may override this function.
atkRelation::_cleanupDestinationFilter()
Remove redundant (more than 1 subsequently) spaces from the filter string.

Inherited From atkAttribute

atkAttribute::atkAttribute()
Constructor
atkAttribute::addCSSClass()
Add a CSS class for this attribute on an HTML form.
atkAttribute::addDependee()
Add a depended attribute for this attribute, which means the depended attribute will be refreshed (using Ajax) if the value for this attribute changes.
atkAttribute::addDependency()
Special case of an on-change handler which gets executed server-side and can manipulate the DOM using PHP wrapper methods available in the atkFormModifier class or by outputting JavaScript code directly.
atkAttribute::addDisabledMode()
Adds a disabled mode flag to the attribute (use DISABLED_VIEW and DISABLED_EDIT flags).
atkAttribute::addFlag()
Adds a flag to the attribute.
atkAttribute::addOnChangeHandler()
Add a javascript onchange event handler.
atkAttribute::addToEditArray()
Adds the attribute's edit / hide HTML code to the edit array.
atkAttribute::addToListArrayHeader()
Adds the attribute / field to the list header. This includes the column name and search field.
atkAttribute::addToListArrayRow()
Adds the attribute / field to the list row. And if the row is totalisable also to the total.
atkAttribute::addToQuery()
Adds this attribute to database queries.
atkAttribute::addToSearchformFields()
Adds the needed searchbox(es) for this attribute to the fields array. This method should only be called by the atkSearchHandler.
atkAttribute::addToViewArray()
Adds the attribute's view / hide HTML code to the view array.
atkAttribute::db2value()
Converts a database value to an internal value.
atkAttribute::dbFieldSize()
Return the size of the field in the database.
atkAttribute::dbFieldType()
Return the database field type of the attribute.
atkAttribute::delete()
The delete method is called by the framework to inform the attribute that a record is deleted.
atkAttribute::deleteAllowed()
Check if delete of the record is allowed.
atkAttribute::display()
Returns a displayable string for this value, to be used in HTML pages.
atkAttribute::edit()
Returns a piece of html code that can be used in a form to edit this attribute's value.
atkAttribute::equal()
This function is called to compare if two records are considered equal by this attribute.
atkAttribute::escapeSQL()
Escape string for use in a query.
atkAttribute::extendedSort()
Retrieves the sort options and sort order.
atkAttribute::fetchMeta()
Fetch the metadata about this attrib from the table metadata, and process it.
atkAttribute::fetchValue()
Convert values from an HTML form posting to an internal value for this attribute.
atkAttribute::fieldName()
Returns the name of the attribute.
atkAttribute::formName()
Retrieve the name of the attribute in HTML forms.
atkAttribute::getAdditionalTabs()
Get list of additional tabs.
atkAttribute::getAttributeHtmlId()
Returns the html identifier of the attribute without setting it Created because getHtmlId would always SET the htmlid while getting it.
atkAttribute::getColumn()
Get column.
atkAttribute::getCSSClassAttribute()
Retrieve the attribute for the HTML-tag for this atkAttribute.
atkAttribute::getCSSClasses()
Retrieve the CSS classes that were registered for this attribute
atkAttribute::getDb()
Get database instance for this attribute. Will return the owner instance database instance unless the owner instance is not set in which case the default instance will be returned.
atkAttribute::getDependencies()
Retrieve the dependees for this attribute.
atkAttribute::getEdit()
Retrieve the HTML code for placing this attribute in an edit page.
atkAttribute::getEditCallback()
Returns the edit callback (if set).
atkAttribute::getError()
Check if this attribute has errors in the specified error list.
atkAttribute::getFlags()
Returns the full set of flags of the attribute.
atkAttribute::getForceInsert()
Getter for wether or not an attribute is forced to insert
atkAttribute::getForceUpdate()
Getter for wether or not an attribute is forced to update
atkAttribute::getHtmlId()
Return the html identifier (id="") of the attribute. (unique within a
atkAttribute::getLabel()
Get the HTML label of the attribute.
atkAttribute::getModule()
Get the module that this attribute originated from.
atkAttribute::getOrderByStatement()
Retrieves the ORDER BY statement for this attribute's node.
atkAttribute::getOwnerInstance()
Returns the owner instance.
atkAttribute::getSearchCondition()
Creates a searchcondition for the field, was once part of searchCondition, however, searchcondition() also immediately adds the search condition.
atkAttribute::getSearchFieldName()
Retrieve the fieldname of the attribute in an atksearch form.
atkAttribute::getSearchMode()
Retrieve the current set or default searchmode of this attribute
atkAttribute::getSearchModeFieldname()
Retrieve the searchmode name of the attribute in an atksearch form.
atkAttribute::getSearchModes()
Retrieve the list of searchmodes supported by the attribute.
atkAttribute::getSections()
retrieve the tabs and/or sections for this attribute.
atkAttribute::getTabs()
retrieve the tabs for this attribute.
atkAttribute::getToolTip()
Retrieve the html/javascript code for showing the tooltip for this attribute.
atkAttribute::getView()
Retrieve the html code for placing this attribute in a view page.
atkAttribute::getViewCallback()
Returns the view callback (if set).
atkAttribute::hasDisabledMode()
Check if the attribute is disabled in some mode (use DISABLED_VIEW and DISABLED_EDIT flags).
atkAttribute::hasFlag()
Check if the attribute has a certain flag.
atkAttribute::hasStore()
This function is used to check whether a attribute has a store function or not.
atkAttribute::hide()
Returns a piece of html code for hiding this attribute in an HTML form, while still posting its value. (<input type="hidden">)
atkAttribute::init()
This function is called right after the attribute is added to the node.
atkAttribute::initDependencies()
Initialize and calls the dependencies.
atkAttribute::initialValue()
Initial value. Returns the initial value for this attribute which will be used in the add form etc.
atkAttribute::isEmpty()
Check if a record has an empty value for this attribute.
atkAttribute::isInitialHidden()
check whether initially hidden or not
atkAttribute::isNotNullInDb()
Checks if this attribute is really not null in the database.
atkAttribute::isPosted()
Is there a value posted for this attribute?
atkAttribute::label()
Return the label of the attribute.
atkAttribute::listHeaderSortOrder()
Retrieve the sortorder for the listheader based on the atkColumnConfig
atkAttribute::loadType()
Determine the load type of this attribute.
atkAttribute::maxInputSize()
Determine the maximum length an input field may be.
atkAttribute::needsInsert()
This function is called by the framework to determine if the attribute needs to be saved to the database in an addDb call.
atkAttribute::needsReload()
This function is called by the framework to determine if the attribute needs to be updated from the db regardless of the attribute being present in the postvars/session
atkAttribute::needsUpdate()
This function is called by the framework to determine if the attribute needs to be saved to the database in an updateDb call.
atkAttribute::observeJS()
Observe the given JavaScript event and execute the given JavaScript statements when the event occurs.
atkAttribute::parseStringValue()
Convert a String representation into an internal value.
atkAttribute::partial()
Handle a partial request for this attribute, different attributes support different partials.
atkAttribute::partial_dependencies()
Call dependencies for this attribute and output JavaScript.
atkAttribute::partial_refresh()
Partial method to refresh the add/edit field for this attribute.
atkAttribute::postInit()
This function is called at the end of the node's init method.
atkAttribute::preAddToEditArray()
Prepare for edit. Is called before all attributes are added to the edit array and allows for last minute manipulations based on the record but also manipulations on the record itself.
atkAttribute::preAddToViewArray()
Prepare for view. Is called before all attributes are added to the view array and allows for last minute manipulations based on the record but also manipulations on the record itself.
atkAttribute::registerJavaScriptObservers()
Register JavaScript event handlers.
atkAttribute::registerKeyListener()
Register keyboard navigation for this attribute.
atkAttribute::removeDisabledMode()
Removes a disabled mode from the attribute.
atkAttribute::removeFlag()
Removes a flag from the attribute.
atkAttribute::search()
Returns a piece of html code that can be used to get search terms input from the user.
atkAttribute::searchCondition()
Creates a search condition for a given search value, and adds it to the query that will be used for performing the actual search.
atkAttribute::searchMode()
Returns piece of html which is used for setting/selecting the search mode for this attribute.
atkAttribute::setAttribSize()
Set the size(s) of the attribute
atkAttribute::setAttributeSearchmode()
Sets the searchmode for an attribute This will cause attributes that respect this to use the attributes searchmode for that particulair attribute instead of the general searchmode.
atkAttribute::setColumn()
Set column.
atkAttribute::setDisabledModes()
Sets the disabled mode flag of the attribute
atkAttribute::setEditCallback()
Sets the edit callback.
atkAttribute::setFlags()
Sets the flags of the attribute
atkAttribute::setForceInsert()
Used to force an attribute to update with every addDb() call
atkAttribute::setForceReload()
Used to force an attribute to update from the db regardless of the
atkAttribute::setForceUpdate()
Used to force an attribute to update with every updateDb() call
atkAttribute::setInitialHidden()
Set whether initially hidden or not. A field is "hidden" by adding the class atkAttrRowHidden.
atkAttribute::setInitialValue()
Set initial value for this attribute.
atkAttribute::setLabel()
Set the label of the attribute
atkAttribute::setLoadType()
Sets the load type.
atkAttribute::setOwnerInstance()
Sets the owner instance.
atkAttribute::setPostFixLabel()
Set the label of the attribute
atkAttribute::setSections()
Put the attribute on one or more tabs and/or sections.
atkAttribute::setStorageType()
Sets the storage type.
atkAttribute::setTabs()
Put the attribute on one or more tabs.
atkAttribute::setViewCallback()
Sets the view callback.
atkAttribute::showOnTab()
Check if the attribute wants to be shown on a certain tab.
atkAttribute::smartSearchCondition()
Creates a smart search condition for a given search value, and adds it to the query that will be used for performing the actual search.
atkAttribute::sortOptions()
Retrieves the sort options for this attribute which is used in recordlists and search actions.
atkAttribute::sortOrder()
Sets the sortorder options for this attribute which is used in recordlists and search actions.
atkAttribute::storageType()
Determine the storage type of this attribute.
atkAttribute::sum()
Calculate the sum of 2 records.
atkAttribute::text()
Translate using the owner instance's module and type.
atkAttribute::validate()
Checks if a value is valid.
atkAttribute::value2db()
Converts the internal attribute value to one that is understood by the database.
atkAttribute::_callDependencies()
Calls the dependency callbacks for this attribute.
atkAttribute::_renderChangeHandler()
Renders the onchange code on the page.
atkAttribute::__toString()
String representation for this attribute (PHP5 only).

[ Top ]

Property Summary

array   $m_excludes   Fields to exclude in the grid
mixed   $m_footerName  
string   $m_headerName   Function names for recordlist header/footer generation
string   $m_loadFilter   The load method might build a custom filter. When it does, we might want to use it again in other methods.
int   $m_maxRecords   The maximum number of detail records. If the number of detail records exceeds this maximum, the link for adding new details disappears.
array;   $m_ownerFields   The field that the foreign key in the destination points to.
mixed   $m_recordlist  
Object   $m_recordlistcache   Instance of atk.recordlist.atkrecordlistcache
array   $m_refKey   List of keys from the destination node that refer to the master record.
boolean   $m_useFilterForAddLink   Use destination filter for autolink add link?
boolean   $m_useFilterForEditLink   Use destination filter for edit link (edit button)?
boolean   $m_useRefKeyForFilter   Use referential key for load filter?

[ Top ]

Method Summary

atkOneToManyRelation   atkOneToManyRelation()   Default constructor.
void   addFlag()  
atkDataGrid   createGrid()   Create the datagrid for the edit and display actions. The datagrid is configured with the correct node filter, excludes etc.
boolean   delete()   The delete method is called by the framework to inform the attribute that the master record is deleted.
mixed   deleteAllowed()   Are we allowed to delete a record?
boolean   destinationHasRelation()   Determine the type of the foreign key on the other side.
String   display()   Returns a displayable string for this value, to be used in HTML pages.
String   edit()   Returns a piece of html code that can be used in a form to edit this attribute's value.
String   editFooter()   Retrieve footer for the recordlist.
String   editHeader()   Retrieve header for the recordlist.
string   getAddFilterString()   Uses the given record to create an add filter string.
String   getAddLabel()   Attempts to get a translated label which can be used when composing an "add" link
void   getAddURL()  
array   getGridExcludes()   Get the exclude fields for the grid
String   getJoinCondition()   Returns the condition (SQL) that should be used when we want to join an owner node with the destination node of the atkOneToManyRelation.
mixed   getOwnerFields()   Get the owner fields
void   getPartialSaveUrl()   assamble the partial save handler url
String   getSearchCondition()   Creates a searchcondition for the field, was once part of searchCondition, however, searchcondition() also immediately adds the search condition.
array   getSearchModes()   Retrieve the list of searchmodes supported by the attribute.
string   getSessionAddFakeId()   Return a fake ID for adding to the session.
string   getSessionStoreKey()   Return the key to use when storing records for the OTM destination in the session if the OTM is used in add mode.
String   hide()   Returns a piece of html code for hiding this attribute in an HTML form.
bool   isEmpty()   Override isEmpty function - in a oneToMany relation we should check if the relation contains any records. When there aren't any, the relation is empty, otherwise it isn't
array   load()   Retrieve detail records from the database.
void   modifyDataGrid()   Modify grid.
void   partial_addorcopy_dialog()   Add or copy dialog.
void   partial_addorcopy_process()   Process add or copy action.
void   partial_add_dialog()   Add dialog.
void   partial_add_process()   Process add dialog save action.
void   partial_edit_dialog()   Edit dialog.
void   partial_edit_process()   Process edit dialog update action.
string   partial_grid()   Updates the datagrid for the edit and display actions.
void   searchCondition()   Adds a search condition for a given search value
void   setFooter()   Set footer generation function name.
void   setGridExcludes()   Set the exclude fields for the grid
void   setHeader()   Set header generation function name.
void   setOwnerFields()   Set the ownerfields
void   setUseFilterForAddLink()   Use destination filter for auto add link?
void   setUseFilterForEditLink()   Use destination filter for edit link (edit button)?
void   setUseRefKeyForFilter()   Use referential key for filtering the records. If you disable this only the explicitly set destination filter will be used.
void   smartSearchCondition()   Creates a smart search condition for a given search value, and adds it to the query that will be used for performing the actual search.
boolean   store()   Store detail records in the database.
bool   storeAdd()   Persist records from the session (in add mode) to the database.
bool   storeCopy()   Copy detail records.
string   translateSelector()   Here we check if the selector is on the owner or on the destination if it's on the destination, we leave it alone.
void   updateSessionAddFakeId()   Recursive method to look for the fake id in the record and replace it with the proper id.
void   _addAddToEditOutput()   Adds the 'add' option to the onetomany, either integrated or as a link
string   _addTablePrefix()   Prefix the passed column name with the table name if there is no prefix in the column name yet.
void   _callSearchConditionOnDestField()   Calls searchCondition on an attribute in the destination
String   _getAddLink()   Internal function to get the add link for a atkOneToManyRelation
string   _getDialogAddLink()   Get the add link when using a dialog
String   _getEmbeddedButtons()   Get the buttons for the embedded mode of the onetomany relation.
array   _getFilterElements()   Get filter elements
String   _getLoadWhereClause()   Create the where clause for the referential key that is used to retrieve the destination records.
String   _getNestedAddLink()   Internal function to get the add link for a atkOneToManyRelation.
void   ___dummyCount()   Define a dummy function to use as a dummy handler function in load() below

[ Top ]

Properties

array   $m_excludes = array() [line 152]

Fields to exclude in the grid

API Tags:
Access:  private


[ Top ]
mixed   $m_footerName = "" [line 144]

[ Top ]
string   $m_headerName = "" [line 143]

Function names for recordlist header/footer generation

API Tags:
Access:  private


[ Top ]
string   $m_loadFilter = "" [line 104]

The load method might build a custom filter. When it does, we might want to use it again in other methods.

API Tags:
Access:  private


[ Top ]
int   $m_maxRecords = 0 [line 95]

The maximum number of detail records. If the number of detail records exceeds this maximum, the link for adding new details disappears.

API Tags:
Access:  private


[ Top ]
array;   $m_ownerFields = array() [line 112]

The field that the foreign key in the destination points to.

Is set to the primary key if no value is provided.

API Tags:
Access:  private


[ Top ]
mixed   $m_recordlist [line 73]

[ Top ]
Object   $m_recordlistcache [line 80]

Instance of atk.recordlist.atkrecordlistcache

API Tags:
Access:  private


[ Top ]
array   $m_refKey = array() [line 87]

List of keys from the destination node that refer to the master record.

API Tags:
Access:  private


[ Top ]
boolean   $m_useFilterForAddLink = true [line 120]

Use destination filter for autolink add link?

API Tags:
Access:  private


[ Top ]
boolean   $m_useFilterForEditLink = true [line 128]

Use destination filter for edit link (edit button)?

API Tags:
Access:  private


[ Top ]
boolean   $m_useRefKeyForFilter = true [line 135]

Use referential key for load filter?

API Tags:
Access:  protected


[ Top ]

Methods

Constructor atkOneToManyRelation  [line 179]

  atkOneToManyRelation atkOneToManyRelation( String $name, String $destination, [mixed $refKey = ""], [int $flags = 0]  )

Default constructor.

Example: Suppose a department has many employees. To edit the list of employees in a department, this relationship can be built like this, in the department node:

  1.  $this->add(new atkOneToManyRelation("employees""mymod.employee""department_id"));

Parameters:
String   $name:  The unique name of this relation within a node. In contrast with most other attributes, the name does not correspond to a database field. (Because in one2many relations, the databasefield that stores the link, is in the destination node and not in the owner node).
String   $destination:  The node to which the relationship is made (in module.nodename notation).
mixed   $refKey:  For regular oneToMany relationships, $refKey is name of the referential key in the destination node. In the case of multi-foreign key relationships, $refKey can be an array of fields.
int   $flags:  Attribute flags that influence this attributes' behavior.


[ Top ]
addFlag  [line 198]

  void addFlag( $flag  )

Parameters:
   $flag: 

API Tags:
Access:  public


Redefinition of:
atkAttribute::addFlag()
Adds a flag to the attribute.

[ Top ]
createGrid  [line 277]

  atkDataGrid createGrid( array $record, string $mode, string $action, [boolean $useSession = true]  )

Create the datagrid for the edit and display actions. The datagrid is configured with the correct node filter, excludes etc.

The datagrid uses for both the edit and display actions the partial_grid method to update it's view.

Parameters:
array   $record:  the record
string   $mode:  the mode
string   $action:  the action
boolean   $useSession:  use session?

API Tags:
Return:  grid
Access:  protected


[ Top ]
delete  [line 939]

  boolean delete( array $record  )

The delete method is called by the framework to inform the attribute that the master record is deleted.

Note that the framework only calls the method when the AF_CASCADE_DELETE flag is set. When calling this method, all detail records belonging to the master record are deleted.

Parameters:
array   $record:  The record that is deleted.

API Tags:
Return:  true if cleanup was successful, false otherwise.


Redefinition of:
atkAttribute::delete()
The delete method is called by the framework to inform the attribute that a record is deleted.

[ Top ]
deleteAllowed  [line 1322]

  mixed deleteAllowed( )

Are we allowed to delete a record?


API Tags:
Return:  bool if allowed or string with not allowed message


Redefinition of:
atkAttribute::deleteAllowed()
Check if delete of the record is allowed.

[ Top ]
destinationHasRelation  [line 1306]

  boolean destinationHasRelation( )

Determine the type of the foreign key on the other side.

On the other side of a oneToManyRelation (in the destination node), there may be a regular atkAttribute for the referential key, or an atkManyToOneRelation pointing back at the source. This method discovers which of the 2 cases we are dealing with.


API Tags:
Return:  True if the foreign key on the other side is a relation, false if not.


[ Top ]
display  [line 369]

  String display( array $record, [String $mode = "list"]  )

Returns a displayable string for this value, to be used in HTML pages.

The atkOneToManyRelation displays a list of detail records in "view" mode, in the form of a read-only data grid. In "list" mode, a plain list of detail record descriptors is displayed.

Parameters:
array   $record:  The record that holds the value for this attribute
String   $mode:  The display mode ("view" for viewpages, or "list" for displaying in recordlists)

API Tags:
Return:  HTML String
Access:  public


Redefinition of:
atkRelation::display()
Return a displayable string for a record.

[ Top ]
edit  [line 450]

  String edit( [array $record = ""], [String $fieldprefix = ""], [String $mode = '']  )

Returns a piece of html code that can be used in a form to edit this attribute's value.

The atkOneToManyRelation's edit method returns a recordlist in which detail records can be removed, added and edited.

Parameters:
array   $record:  The record that holds the value for this attribute.
String   $fieldprefix:  The fieldprefix to put in front of the name of any html form element for this attribute.
String   $mode:  The mode we're in ('add' or 'edit')

API Tags:
Return:  A piece of htmlcode for editing this attribute
Access:  public


Redefinition of:
atkAttribute::edit()
Returns a piece of html code that can be used in a form to edit this attribute's value.

[ Top ]
editFooter  [line 824]

  String editFooter( [array $record = NULL], [array $childrecords = NULL]  )

Retrieve footer for the recordlist.

The regular atkOneToManyRelation has no implementation for this method, but it may be overridden in derived classes to add extra information (text, links, whatever) to the bottom of the attribute, just after the recordlist. This is similar to the adminFooter() method in atkNode.

Parameters:
array   $record:  The master record that is being edited.
array   $childrecords:  The childrecords in this master/detail relationship.

API Tags:
Return:  a String to be added at the bottom of the recordlist.


[ Top ]
editHeader  [line 801]

  String editHeader( [array $record = NULL], [array $childrecords = NULL]  )

Retrieve header for the recordlist.

The regular atkOneToManyRelation has no implementation for this method, but it may be overridden in derived classes to add extra information (text, links, whatever) to the top of the attribute, right before the recordlist. This is similar to the adminHeader() method in atkNode.

Parameters:
array   $record:  The master record that is being edited.
array   $childrecords:  The childrecords in this master/detail relationship.

API Tags:
Return:  a String to be added to the header of the recordlist.


[ Top ]
getAddFilterString  [line 626]

  string getAddFilterString( array $record  )

Uses the given record to create an add filter string.

Parameters:
array   $record: 

API Tags:
Return:  filter string


[ Top ]
getAddLabel  [line 767]

  String getAddLabel( )

Attempts to get a translated label which can be used when composing an "add" link


API Tags:
Return:  Localised "add" label


Redefinition of:
atkRelation::getAddLabel()
Attempts to get a translated label which can be used when composing an "add" link

[ Top ]
getAddURL  [line 757]

  void getAddURL( [ $params = array()]  )

Parameters:
   $params: 

API Tags:
Access:  protected


[ Top ]
getGridExcludes  [line 1574]

  array getGridExcludes( )

Get the exclude fields for the grid


API Tags:
Return:  with exclude fields


[ Top ]
getJoinCondition  [line 1128]

  String getJoinCondition( &$query, [String $ownerAlias = ""], [String $destAlias = ""], atkQuery $query  )

Returns the condition (SQL) that should be used when we want to join an owner node with the destination node of the atkOneToManyRelation.

Parameters:
atkQuery   $query:  The query object.
String   $ownerAlias:  The owner table alias.
String   $destAlias:  The destination table alias.
   &$query: 

API Tags:
Return:  SQL string for joining the owner with the destination.


Redefinition of:
atkRelation::getJoinCondition()
Returns the condition (SQL) that should be used when we want to join a relation's owner node with the parent node.

[ Top ]
getOwnerFields  [line 223]

  mixed getOwnerFields( )

Get the owner fields


API Tags:
Return:  Array or String with ownerfield(s)


[ Top ]
getPartialSaveUrl  [line 1429]

  void getPartialSaveUrl( )

assamble the partial save handler url

this allows dynamically updating the attribute


API Tags:
Access:  public


[ Top ]
getSearchCondition  [line 1236]

  String getSearchCondition( &$query, String $table, mixed $value, String $searchmode, atkQuery $query  )

Creates a searchcondition for the field, was once part of searchCondition, however, searchcondition() also immediately adds the search condition.

Parameters:
atkQuery   $query:  The query object where the search condition should be placed on
String   $table:  The name of the table in which this attribute is stored
mixed   $value:  The value the user has entered in the searchbox
String   $searchmode:  The searchmode to use. This can be any one of the supported modes, as returned by this attribute's getSearchModes() method.
   &$query: 

API Tags:
Return:  The searchcondition to use.


Redefinition of:
atkAttribute::getSearchCondition()
Creates a searchcondition for the field, was once part of searchCondition, however, searchcondition() also immediately adds the search condition.

[ Top ]
getSearchModes  [line 1113]

  array getSearchModes( )

Retrieve the list of searchmodes supported by the attribute.

Note that not all modes may be supported by the database driver. Compare this list to the one returned by the databasedriver, to determine which searchmodes may be used.


API Tags:
Return:  List of supported searchmodes


Redefinition of:
atkRelation::getSearchModes()
Retrieve the searchmodes supported by the relation.

[ Top ]
getSessionAddFakeId  [line 604]

  string getSessionAddFakeId( )

Return a fake ID for adding to the session.

We use a high negative number because we have to sneak this in as if it's a REAL id for the owner, tricking MTOs in the destination that point back to us into thinking they already have an id. But we also have to make sure it's recognizable, so when we persist the records from the session to the database, then we can set the proper id.


API Tags:
Access:  public


[ Top ]
getSessionStoreKey  [line 615]

  string getSessionStoreKey( )

Return the key to use when storing records for the OTM destination in the session if the OTM is used in add mode.


API Tags:
Access:  public


[ Top ]
hide  [line 1098]

  String hide( [ $record = ''], [ $fieldprefix = '']  )

Returns a piece of html code for hiding this attribute in an HTML form.

Because the oneToMany has nothing to hide, we override the default hide() implementation with a dummy method.

Parameters:
   $record: 
   $fieldprefix: 

API Tags:
Return:  An empty string.


Redefinition of:
atkAttribute::hide()
Returns a piece of html code for hiding this attribute in an HTML form, while still posting its value. (<input type="hidden">)

[ Top ]
isEmpty  [line 915]

  bool isEmpty( $record, array &$record  )

Override isEmpty function - in a oneToMany relation we should check if the relation contains any records. When there aren't any, the relation is empty, otherwise it isn't

Parameters:
array   &$record:  The record to check
   $record: 

API Tags:
Return:  true if a destination record is present. False if not.


Redefinition of:
atkRelation::isEmpty()
Check if the relation is empty

[ Top ]
load  [line 886]

  array load( &$db, array $record, [String $mode = ""], [bool $paging = false], atkDb $db  )

Retrieve detail records from the database.

Called by the framework to load the detail records.

Parameters:
atkDb   $db:  The database used by the node.
array   $record:  The master record
String   $mode:  The mode for loading (admin, select, copy, etc)
bool   $paging:  divide the result records on multiple pages ($config_recordsperpage)
   &$db: 

API Tags:
Return:  Recordset containing detailrecords, or NULL if no detail records are present. Note: when $mode is edit, this method will always return NULL. This is a framework optimization because in edit pages, the records are loaded on the fly.


[ Top ]
modifyDataGrid  [line 342]

  void modifyDataGrid( atkDataGrid $grid, int $mode  )

Modify grid.

Parameters:
atkDataGrid   $grid:  grid
int   $mode:  CREATE or RESUME

API Tags:
Access:  protected


[ Top ]
partial_addorcopy_dialog  [line 1443]

  void partial_addorcopy_dialog( )

Add or copy dialog.



[ Top ]
partial_addorcopy_process  [line 1455]

  void partial_addorcopy_process( )

Process add or copy action.



[ Top ]
partial_add_dialog  [line 1391]

  void partial_add_dialog( )

Add dialog.



[ Top ]
partial_add_process  [line 1411]

  void partial_add_process( )

Process add dialog save action.



[ Top ]
partial_edit_dialog  [line 1507]

  void partial_edit_dialog( )

Edit dialog.



[ Top ]
partial_edit_process  [line 1527]

  void partial_edit_process( )

Process edit dialog update action.



[ Top ]
partial_grid  [line 316]

  string partial_grid( )

Updates the datagrid for the edit and display actions.


API Tags:
Return:  grid html
Access:  public


[ Top ]
searchCondition  [line 1201]

  void searchCondition( &$query, String $table, mixed $value, String $searchmode, [string $fieldaliasprefix = ''], atkQuery $query  )

Adds a search condition for a given search value

Parameters:
atkQuery   $query:  The query to which the condition will be added.
String   $table:  The name of the table in which this attribute is stored
mixed   $value:  The value the user has entered in the searchbox
String   $searchmode:  The searchmode to use. This can be any one of the supported modes, as returned by this attribute's getSearchModes() method.
string   $fieldaliasprefix:  optional prefix for the fieldalias in the table
   &$query: 


Redefinition of:
atkAttribute::searchCondition()
Creates a search condition for a given search value, and adds it to the query that will be used for performing the actual search.

[ Top ]
setFooter  [line 1554]

  void setFooter( String $name  )

Set footer generation function name.

Parameters:
String   $name:  The footder generation function name.


[ Top ]
setGridExcludes  [line 1564]

  void setGridExcludes( array $excludes  )

Set the exclude fields for the grid

Parameters:
array   $excludes: 


[ Top ]
setHeader  [line 1545]

  void setHeader( String $name  )

Set header generation function name.

Parameters:
String   $name:  The header generation function name.


[ Top ]
setOwnerFields  [line 213]

  void setOwnerFields( array $ownerfields  )

Set the ownerfields

Parameters:
array   $ownerfields: 


[ Top ]
setUseFilterForAddLink  [line 237]

  void setUseFilterForAddLink( boolean $useFilter  )

Use destination filter for auto add link?

Parameters:
boolean   $useFilter:  use destination filter for add link?


[ Top ]
setUseFilterForEditLink  [line 247]

  void setUseFilterForEditLink( boolean $useFilter  )

Use destination filter for edit link (edit button)?

Parameters:
boolean   $useFilter:  use destnation filter for edit link (edit button)?


[ Top ]
setUseRefKeyForFilter  [line 258]

  void setUseRefKeyForFilter( bool $useRefKey  )

Use referential key for filtering the records. If you disable this only the explicitly set destination filter will be used.

Parameters:
bool   $useRefKey: 

API Tags:
Access:  public


[ Top ]
smartSearchCondition  [line 1158]

  void smartSearchCondition( Integer $id, Integer $nr, Array $path, &$query, String $ownerAlias, Mixed $value, String $mode, atkQuery $query  )

Creates a smart search condition for a given search value, and adds it to the query that will be used for performing the actual search.

Parameters:
Integer   $id:  The unique smart search criterium identifier.
Integer   $nr:  The element number in the path.
Array   $path:  The remaining attribute path.
atkQuery   $query:  The query to which the condition will be added.
String   $ownerAlias:  The owner table alias to use.
Mixed   $value:  The value the user has entered in the searchbox.
String   $mode:  The searchmode to use.
   &$query: 


Redefinition of:
atkAttribute::smartSearchCondition()
Creates a smart search condition for a given search value, and adds it to the query that will be used for performing the actual search.

[ Top ]
store  [line 980]

  boolean store( atkDb $db, array $record, string $mode  )

Store detail records in the database.

For onetomanyrelation, this function does not have much use, since it stores records using its 'add link'. There are however two modes that use this:

  • 'copy' mode The copyDb function, to clone detail records.
  • 'add' mode When the OTM was used in add mode, we have to transfer the records stored in the session to the database.
other than those this method does not do anything.

Parameters:
atkDb   $db:  The database used by the node.
array   $record:  The master record which has the detail records embedded.
string   $mode:  The mode we're in ("add", "edit", "copy")

API Tags:
Return:  true if store was successful, false otherwise.


[ Top ]
storeAdd  [line 998]

  bool storeAdd( atkDb $db, array $record, string $mode  )

Persist records from the session (in add mode) to the database.

Parameters:
atkDb   $db: 
array   $record: 
string   $mode: 

API Tags:
Access:  private


[ Top ]
storeCopy  [line 1049]

  bool storeCopy( atkDb $db, array $record, string $mode  )

Copy detail records.

Parameters:
atkDb   $db:  Datbase connection to use
array   $record:  Owner record
string   $mode:  Mode ('copy')

API Tags:
Access:  private


[ Top ]
translateSelector  [line 1352]

  string translateSelector( string $selector  )

Here we check if the selector is on the owner or on the destination if it's on the destination, we leave it alone.

Otherwise we translate it back to the destination.

Parameters:
string   $selector:  the selector we have to translate

API Tags:
Return:  the new selector

Information Tags:
Todo:  when we translate the selector, we get the last used refKey but how do we know what is the right one?

[ Top ]
updateSessionAddFakeId  [line 1025]

  void updateSessionAddFakeId( &$row, mixed $id, array $record, array $row  )

Recursive method to look for the fake id in the record and replace it with the proper id.

Parameters:
array   $row:  Destination record
mixed   $id:  Fake id to look for
array   $record:  Owner record
   &$row: 

API Tags:
Access:  private


[ Top ]
_addAddToEditOutput  [line 507]

  void _addAddToEditOutput( &$output, Array $myrecords, array $record, [ $mode = ""], [ $fieldprefix = ""], String $output  )

Adds the 'add' option to the onetomany, either integrated or as a link

Parameters:
String   $output:  The HTML output of the edit function
Array   $myrecords:  The records that are loaded into the recordlist
array   $record:  The master record that is being edited.
   &$output: 
   $mode: 
   $fieldprefix: 


[ Top ]
_addTablePrefix  [line 745]

  string _addTablePrefix( string $columnName, [string $destAlias = '']  )

Prefix the passed column name with the table name if there is no prefix in the column name yet.

Parameters:
string   $columnName: 
string   $destAlias: 


[ Top ]
_callSearchConditionOnDestField  [line 1283]

  void _callSearchConditionOnDestField( atkQuery &$query, String $table, mixed $value, mixed $searchmode, String $field, String $reftable  )

Calls searchCondition on an attribute in the destination

To hook the destination attribute on the query

Parameters:
atkQuery   &$query:  The query object
String   $table:  The table to search on
mixed   $value:  The value to search
mixed   $searchmode:  The mode used when searching
String   $field:  The name of the attribute
String   $reftable: 


[ Top ]
_getAddLink  [line 555]

  String _getAddLink( Array $myrecords, Array $record, [bool $saveform = true], [ $mode = ""], [ $fieldprefix = ""]  )

Internal function to get the add link for a atkOneToManyRelation

Parameters:
Array   $myrecords:  The load of all attributes (see comment in edit() code)
Array   $record:  The record that holds the value for this attribute.
bool   $saveform:  Save the form values?
   $mode: 
   $fieldprefix: 

API Tags:
Return:  The link to add records to the onetomany


[ Top ]
_getDialogAddLink  [line 645]

  string _getDialogAddLink( array $record, string $action, [ $params = array()]  )

Get the add link when using a dialog

Parameters:
array   $record: 
string   $action: 
   $params: 

API Tags:
Return:  The dialog add link html-code


[ Top ]
_getEmbeddedButtons  [line 539]

  String _getEmbeddedButtons( )

Get the buttons for the embedded mode of the onetomany relation.


API Tags:
Return:  The HTML buttons

Information Tags:
Todo:  Move this to a template

[ Top ]
_getFilterElements  [line 704]

  array _getFilterElements( array $record  )

Get filter elements

Parameters:
array   $record: 

API Tags:
Return:  Array with filter elements


[ Top ]
_getLoadWhereClause  [line 842]

  String _getLoadWhereClause( array $record  )

Create the where clause for the referential key that is used to retrieve the destination records.

Parameters:
array   $record:  The master record

API Tags:
Return:  SQL where clause
Access:  private


[ Top ]
_getNestedAddLink  [line 675]

  String _getNestedAddLink( Array $myrecords, Array $record, [bool $saveform = true], [ $fieldprefix = ''], [ $params = array()]  )

Internal function to get the add link for a atkOneToManyRelation.

Parameters:
Array   $myrecords:  The load of all attributes (see comment in edit() code)
Array   $record:  The record that holds the value for this attribute.
bool   $saveform:  Save the values of the form?
   $fieldprefix: 
   $params: 

API Tags:
Return:  The link to add records to the onetomany


[ Top ]
___dummyCount  [line 868]

  void ___dummyCount( )

Define a dummy function to use as a dummy handler function in load() below


API Tags:
Access:  public


[ Top ]
Home | About | Contact