Docs For Class atkAttribute
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 atkAttribute [ package: atk ]

Class: atkAttribute

Source Location: /attributes/class.atkattribute.inc

Class atkAttribute

Class Overview

The atkAttribute class represents an attribute of an atkNode.

An atkAttribute has a name and a set of parameters that control its behaviour, like whether an atkAttribute is obligatory, etc.

Located in /attributes/class.atkattribute.inc [line 369]

Wiki documentation



		
				Author(s):
		
		
		
Information Tags:

Properties

Methods

[ Top ]

Descendants

Child Class Description
atkAggregatedColumn The atkAggregatedColumn aggregates multiple attributes to one colunm in list view. The attribute displays and sorts according to the $template parameter and searches in fields, indicated in $searchfields array parameter.
atkBoolAttribute The atkBoolAttribute class represents an attribute of a node that can either be true or false.
atkCalculatorAttribute a simple but flexible value calculator.
atkCaptchaAttribute With the atkCaptchaAttribute class you can easily add a captcha to a forum or guestbook.
atkColorPickerAttribute The atkColorPickerAttribute class represents an attribute of an atkNode.
atkDateAttribute The atkDateAttribute class offers a date widget for date fields.
atkDateTimeAttribute The atkDateTimeAttribute class can be used for date and time entry.
atkDummyAttribute With the atkDummyAttribute class you can place comments between other attributes.
atkDurationAttribute The atkDurationAttribute is an attribute for entering a length of time.
atkEmailAttribute Attribute for editing email fields.
atkExpressionAttribute With the atkExpressionAttribute class you can select arbitrary SQL expressions like subqueries etc. It's not possible to save values using this attribute.
atkFieldSet A fieldset can be used to combine multiple attributes to a single attribute in edit/view mode.
atkFileAttribute With this you can upload, select and remove files in a given directory.
atkFormatAttribute The atkFormatAttribute can be used to edit a formatted string.
atkFuzzySearchAttribute The atkFuzzySearchAttribute class represents an attribute of a node that has a field where you can enter certain keywords to search for on another node.
atkIpAttribute The atkIpAttribute can be used to let the user enter IP(v4) addresses.
atkListAttribute The atkListAttribute class represents an attribute of a node that has a selectbox to select from predefined values.
atkMlAttribute The atkMlAttribute class represents an multilanguage attribute of an atkNode.
atkMlWrapper Wrapper for turning any attribute into a multilanguage enabled attribute.
atkNumberAttribute The atkNumberAttribute can be used for numeric values.
atkParserAttribute The atkParserAttribute can be used to create links or texts that contain values, by supplying a template as parameter.
atkPasswordAttribute The atkPasswordAttribute class represents an attribute of a node
atkProfileAttribute The atkProfileAttribute is an attribute to edit a security profile.
atkRadioDetailsAttribute Displays radio buttons with options to choose from just like the atkRadioAttribute but allows you to use other attributes for detail selections once certain options are selected.
atkTabbedPane atkTabbedPane place regular attribute to the additional tabbed pane
atkTextAttribute The atkTextAttribute class represents an attribute of a node that is a big text field.
atkTimeAttribute The atkTimeAttribute class represents an attribute of a node that has a selectbox to select from predefined time values.
atkUrlAttribute The atkUrlAttribute class represents a field containing URLs.
atkFilter Abstract base class for atkFilters.
atkRelation The atkRelation class defines a relation to another node.

[ Top ]

Property Summary

string   $m_column   Column.
sttsy   $m_cssclasses   The css classes of the attribute
String   $m_dbfieldtype   The database fieldtype.
array   $m_dependencies   Variable to store dependency callbacks.
int   $m_disabledModes   Attribute to store disabled modes.
mixed   $m_editCallback   Edit callback.
int   $m_flags   The attribute flags (see above)
bool   $m_forceinsert   Wether to force an insert of the attribute
bool   $m_forcereload   Wether to force a reload of the attribute ignoring the saved session data
bool   $m_forceupdate   Wether to force an update of the attribute
String   $m_htmlid   The id of the attribute in the HTML
int   $m_index   Index of the attribute within its node.
mixed   $m_initialValue   Initial value.
bool   $m_initial_hidden   Whether to hide initially or not
array   $m_jsObservers   JavaScript observers. Key is the event name value is an array with event handlers.
String   $m_label   The label of the attribute.
int   $m_loadType   Load type.
int   $m_maxsize   The maximum size the attribute's value may have in the database.
String   $m_module   The module of the attribute (if empty, the module from the owner node should be assumed).
String   $m_name   The name of the attribute
Array   $m_onchangecode   Array for containing onchange javascript code
String   $m_onchangehandler_init   Variable to store initialisation javascript code in for the changehandler.
int   $m_order   The order of the attribute within its node.
String   $m_owner   The name of the atkNode that owns this attribute (set by atknode)
atkNode   $m_ownerInstance   Instance of the atkNode that owns this attribute
String   $m_postfixlabel   The postfix label of the attribute.
String   $m_searchmode   The searchmode for this attribute
int   $m_searchsize   The size the attribute's search input field.
mixed   $m_sections   The section(s) on which the attribute lives.
int   $m_size   The size the attribute's field.
int   $m_storageType   Storage type.
mixed   $m_tabs   The tab(s) on which the attribute lives.
mixed   $m_viewCallback   View callback.

[ Top ]

Method Summary

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.
void   addToEditArray()   Adds the attribute's edit / hide HTML code to the edit array.
void   addToListArrayHeader()   Adds the attribute / field to the list header. This includes the column name and search field.
void   addToListArrayRow()   Adds the attribute / field to the list row. And if the row is totalisable also to the total.
void   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.
void   addToViewArray()   Adds the attribute's view / hide HTML code to the view array.
mixed   db2value()   Converts a database value to an internal value.
int   dbFieldSize()   Return the size of the field in the database.
String   dbFieldType()   Return the database field type of the attribute.
boolean   delete()   The delete method is called by the framework to inform the attribute that a record is deleted.
boolean   deleteAllowed()   Check if delete of the record is allowed.
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.
boolean   equal()   This function is called to compare if two records are considered equal by this attribute.
String   escapeSQL()   Escape string for use in a query.
String   extendedSort()   Retrieves the sort options and sort order.
void   fetchMeta()   Fetch the metadata about this attrib from the table metadata, and process it.
String   fetchValue()   Convert values from an HTML form posting to an internal value for this attribute.
String   fieldName()   Returns the name of the attribute.
String   formName()   Retrieve the name of the attribute in HTML forms.
array   getAdditionalTabs()   Get list of additional tabs.
String   getAttributeHtmlId()   Returns the html identifier of the attribute without setting it Created because getHtmlId would always SET the htmlid while getting it.
string   getColumn()   Get column.
String   getCSSClassAttribute()   Retrieve the attribute for the HTML-tag for this atkAttribute.
Array   getCSSClasses()   Retrieve the CSS classes that were registered for this attribute
atkDb   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.
array   getDependencies()   Retrieve the dependees for this attribute.
String   getEdit()   Retrieve the HTML code for placing this attribute in an edit page.
mixed   getEditCallback()   Returns the edit callback (if set).
boolean   getError()   Check if this attribute has errors in the specified error list.
int   getFlags()   Returns the full set of flags of the attribute.
bool   getForceInsert()   Getter for wether or not an attribute is forced to insert
bool   getForceUpdate()   Getter for wether or not an attribute is forced to update
String   getHtmlId()   Return the html identifier (id="") of the attribute. (unique within a
String   getLabel()   Get the HTML label of the attribute.
String   getModule()   Get the module that this attribute originated from.
String   getOrderByStatement()   Retrieves the ORDER BY statement for this attribute's node.
atkNode   &getOwnerInstance()   Returns the owner instance.
String   getSearchCondition()   Creates a searchcondition for the field, was once part of searchCondition, however, searchcondition() also immediately adds the search condition.
String   getSearchFieldName()   Retrieve the fieldname of the attribute in an atksearch form.
String   getSearchMode()   Retrieve the current set or default searchmode of this attribute
String   getSearchModeFieldname()   Retrieve the searchmode name of the attribute in an atksearch form.
array   getSearchModes()   Retrieve the list of searchmodes supported by the attribute.
array   getSections()   retrieve the tabs and/or sections for this attribute.
array   getTabs()   retrieve the tabs for this attribute.
String   getToolTip()   Retrieve the html/javascript code for showing the tooltip for this attribute.
String   getView()   Retrieve the html code for placing this attribute in a view page.
mixed   getViewCallback()   Returns the view callback (if set).
boolean   hasDisabledMode()   Check if the attribute is disabled in some mode (use DISABLED_VIEW and DISABLED_EDIT flags).
boolean   hasFlag()   Check if the attribute has a certain flag.
boolean   hasStore()   This function is used to check whether a attribute has a store function or not.
String   hide()   Returns a piece of html code for hiding this attribute in an HTML form, while still posting its value. (<input type="hidden">)
void   init()   This function is called right after the attribute is added to the node.
void   initDependencies()   Initialize and calls the dependencies.
mixed   initialValue()   Initial value. Returns the initial value for this attribute which will be used in the add form etc.
boolean   isEmpty()   Check if a record has an empty value for this attribute.
initially   isInitialHidden()   check whether initially hidden or not
boolean   isNotNullInDb()   Checks if this attribute is really not null in the database.
boolean   isPosted()   Is there a value posted for this attribute?
String   label()   Return the label of the attribute.
String   listHeaderSortOrder()   Retrieve the sortorder for the listheader based on the atkColumnConfig
int   loadType()   Determine the load type of this attribute.
int   maxInputSize()   Determine the maximum length an input field may be.
boolean   needsInsert()   This function is called by the framework to determine if the attribute needs to be saved to the database in an addDb call.
boolean   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
boolean   needsUpdate()   This function is called by the framework to determine if the attribute needs to be saved to the database in an updateDb call.
void   observeJS()   Observe the given JavaScript event and execute the given JavaScript statements when the event occurs.
mixed   parseStringValue()   Convert a String representation into an internal value.
String   partial()   Handle a partial request for this attribute, different attributes support different partials.
void   partial_dependencies()   Call dependencies for this attribute and output JavaScript.
String   partial_refresh()   Partial method to refresh the add/edit field for this attribute.
void   postInit()   This function is called at the end of the node's init method.
void   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.
void   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.
void   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.
String   search()   Returns a piece of html code that can be used to get search terms input from the user.
void   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.
string   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
void   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.
void   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.
void   setViewCallback()   Sets the view callback.
boolean   showOnTab()   Check if the attribute wants to be shown on a certain tab.
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.
String   sortOptions()   Retrieves the sort options for this attribute which is used in recordlists and search actions.
String   sortOrder()   Sets the sortorder options for this attribute which is used in recordlists and search actions.
int   storageType()   Determine the storage type of this attribute.
array   sum()   Calculate the sum of 2 records.
String   text()   Translate using the owner instance's module and type.
void   validate()   Checks if a value is valid.
String   value2db()   Converts the internal attribute value to one that is understood by the database.
void   _callDependencies()   Calls the dependency callbacks for this attribute.
void   _renderChangeHandler()   Renders the onchange code on the page.
string   __toString()   String representation for this attribute (PHP5 only).

[ Top ]

Properties

string   $m_column [line 592]

Column.

API Tags:
Access:  private


[ Top ]
sttsy   $m_cssclasses = array() [line 476]

The css classes of the attribute

API Tags:
Access:  private


[ Top ]
String   $m_dbfieldtype = "" [line 434]

The database fieldtype.

API Tags:
Access:  private


[ Top ]
array   $m_dependencies = array() [line 546]

Variable to store dependency callbacks.

API Tags:
Access:  private


[ Top ]
int   $m_disabledModes = 0 [line 553]

Attribute to store disabled modes.

API Tags:
Access:  private


[ Top ]
mixed   $m_editCallback = null [line 614]

Edit callback.

API Tags:
Access:  private


[ Top ]
int   $m_flags = 0 [line 383]

The attribute flags (see above)

API Tags:
Access:  private


[ Top ]
bool   $m_forceinsert = false [line 509]

Wether to force an insert of the attribute

API Tags:
Access:  private


[ Top ]
bool   $m_forcereload = false [line 517]

Wether to force a reload of the attribute ignoring the saved session data

API Tags:
Access:  private


[ Top ]
bool   $m_forceupdate = false [line 524]

Wether to force an update of the attribute

API Tags:
Access:  private


[ Top ]
String   $m_htmlid [line 469]

The id of the attribute in the HTML

API Tags:
Access:  private


[ Top ]
int   $m_index = 0 [line 448]

Index of the attribute within its node.

API Tags:
Access:  private


[ Top ]
mixed   $m_initialValue = NULL [line 585]

Initial value.

API Tags:
See:  atkAttribute::setInitialValue()
Access:  private


[ Top ]
bool   $m_initial_hidden = false [line 560]

Whether to hide initially or not

API Tags:
Access:  private


[ Top ]
array   $m_jsObservers = array() [line 600]

JavaScript observers. Key is the event name value is an array with event handlers.

API Tags:
Access:  private


[ Top ]
String   $m_label = "" [line 483]

The label of the attribute.

API Tags:
Access:  private


[ Top ]
int   $m_loadType = array() [line 577]

Load type.

API Tags:
See:  atkAttribute::setLoadType()
Access:  private


[ Top ]
int   $m_maxsize = 0 [line 427]

The maximum size the attribute's value may have in the database.

API Tags:
Access:  private


[ Top ]
String   $m_module = "" [line 399]

The module of the attribute (if empty, the module from the owner node should be assumed).

API Tags:
Access:  private


[ Top ]
String   $m_name [line 376]

The name of the attribute

API Tags:
Access:  private


[ Top ]
Array   $m_onchangecode = array() [line 531]

Array for containing onchange javascript code

API Tags:
Access:  private


Redefined in descendants as:

[ Top ]
String   $m_onchangehandler_init = "" [line 539]

Variable to store initialisation javascript code in for the changehandler.

API Tags:
Access:  private


Redefined in descendants as:

[ Top ]
int   $m_order = 0 [line 441]

The order of the attribute within its node.

API Tags:
Access:  private


[ Top ]
String   $m_owner = "" [line 390]

The name of the atkNode that owns this attribute (set by atknode)

API Tags:
Access:  private


[ Top ]
atkNode   $m_ownerInstance = "" [line 406]

Instance of the atkNode that owns this attribute

API Tags:
Access:  private


[ Top ]
String   $m_postfixlabel = "" [line 490]

The postfix label of the attribute.

API Tags:
Access:  private


[ Top ]
String   $m_searchmode = "" [line 502]

The searchmode for this attribute

This var exists so that you can assign searchmodes to specific attributes instead of having a general searchmode for the entire search. This can be any one of the supported modes, as returned by the attribute's getSearchModes() method.

API Tags:
Access:  private


[ Top ]
int   $m_searchsize = 0 [line 420]

The size the attribute's search input field.

API Tags:
Access:  private


[ Top ]
mixed   $m_sections = "*" [line 462]

The section(s) on which the attribute lives.

API Tags:
Access:  private


[ Top ]
int   $m_size = 0 [line 413]

The size the attribute's field.

API Tags:
Access:  private


Redefined in descendants as:

[ Top ]
int   $m_storageType = array() [line 568]

Storage type.

API Tags:
See:  atkAttribute::setStorageType()
Access:  private


[ Top ]
mixed   $m_tabs = "*" [line 455]

The tab(s) on which the attribute lives.

API Tags:
Access:  private


[ Top ]
mixed   $m_viewCallback = null [line 607]

View callback.

API Tags:
Access:  private


[ Top ]

Methods

Constructor atkAttribute  [line 638]

  atkAttribute atkAttribute( String $name, [int $flags = 0], [mixed $size = 0]  )

Constructor

Example: $this->add(new atkAttribute("name",AF_OBLIGATORY, 30));

Note: If you want to use the db/ddl utility class to automatically generate the table, the $size parameter must be set, for it will use the size specified here to determine the field length. (Derived classes might have reasonable default values, but the standard atkAttribute doesn't.)

Parameters:
String   $name:  Name of the attribute (unique within a node, and for most attributes, corresponds to a field in the database.
int   $flags:  Flags for the attribute.
mixed   $size:  The size(s) of the attribute. See the $size parameter of the setAttribSize() method for more information on the possible values of this parameter.


[ Top ]
addCSSClass  [line 2976]

  atkAttribute addCSSClass( String $classname  )

Add a CSS class for this attribute on an HTML form.

Parameters:
String   $classname:  The name of a class.

API Tags:
Return:  The instance of this atkAttribute


[ Top ]
addDependee  [line 2853]

  atkAttribute addDependee( string $attribute  )

Add a depended attribute for this attribute, which means the depended attribute will be refreshed (using Ajax) if the value for this attribute changes.

This method is deprecated, use atkAttribute::addDependency instead!

Parameters:
string   $attribute:  attribute name

API Tags:
Return:  attribute instance.
See:  atkAttribute::addDependency
Deprecated:  
Access:  public


[ Top ]
addDependency  [line 2869]

  atkAttribute addDependency( mixed $callback  )

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.

Parameters:
mixed   $callback:  callback closure or something else which is_callable

API Tags:
Return:  attribute instance
Access:  public


[ Top ]
addDisabledMode  [line 772]

  atkAttribute addDisabledMode( int $flag  )

Adds a disabled mode flag to the attribute (use DISABLED_VIEW and DISABLED_EDIT flags).

Parameters:
int   $flag:  The flag to add to the attribute

API Tags:
Return:  The instance of this atkAttribute


[ Top ]
addFlag  [line 697]

  atkAttribute addFlag( int $flag  )

Adds a flag to the attribute.

Note that adding flags at any time after the constructor might not always work. There are flags that are processed only at constructor time.

Parameters:
int   $flag:  The flag to add to the attribute

API Tags:
Return:  The instance of this atkAttribute


Redefined in descendants as:

[ Top ]
addOnChangeHandler  [line 1012]

  atkAttribute addOnChangeHandler( string $jscode  )

Add a javascript onchange event handler.

Parameters:
string   $jscode:  A block of valid javascript code.

API Tags:
Return:  Returns the instance of this attribute.


Redefined in descendants as:

[ Top ]
addToEditArray  [line 1156]

  void addToEditArray( String $mode, &$arr, &$defaults, &$error, String $fieldprefix, array $arr, array $defaults, array $error  )

Adds the attribute's edit / hide HTML code to the edit array.

This method is called by the node if it wants the data needed to create an edit form.

This is a framework method, it should never be called directly.

Parameters:
String   $mode:  the edit mode ("add" or "edit")
array   $arr:  pointer to the edit array
array   $defaults:  pointer to the default values array
array   $error:  pointer to the error array
String   $fieldprefix:  the fieldprefix
   &$arr: 
   &$defaults: 
   &$error: 


Redefined in descendants as:

[ Top ]
addToListArrayHeader  [line 1460]

  void addToListArrayHeader( String $action, &$arr, String $fieldprefix, int $flags, array $atksearch, atkColumnConfig $columnConfig, [atkDataGrid $grid = null], [string $column = '*'], array $arr  )

Adds the attribute / field to the list header. This includes the column name and search field.

Framework method. It should not be necessary to call this method directly.

Parameters:
String   $action:  the action that is being performed on the node
array   $arr:  reference to the the recordlist array
String   $fieldprefix:  the fieldprefix
int   $flags:  the recordlist flags
array   $atksearch:  the current ATK search list (if not empty)
atkColumnConfig   $columnConfig:  Column configuration object
atkDataGrid   $grid:  The atkDataGrid this attribute lives on.
string   $column:  child column (null for this attribute, * for this attribute and all childs)
   &$arr: 

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
addToListArrayRow  [line 1513]

  void addToListArrayRow( String $action, &$arr, int $nr, String $fieldprefix, int $flags, [boolean $edit = false], [atkDataGrid $grid = null], [string $column = '*'], array $arr  )

Adds the attribute / field to the list row. And if the row is totalisable also to the total.

Framework method. It should not be necessary to call this method directly.

Parameters:
String   $action:  the action that is being performed on the node
array   $arr:  reference to the the recordlist array
int   $nr:  the current row number
String   $fieldprefix:  the fieldprefix
int   $flags:  the recordlist flags
boolean   $edit:  editing?
atkDataGrid   $grid:  data grid
string   $column:  child column (null for this attribute, * for this attribute and all childs)
   &$arr: 

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
addToQuery  [line 1835]

  void addToQuery( &$query, [String $tablename = ""], [String $fieldaliasprefix = ""], [ &$rec = ""], int $level, String $mode, atkQuery $query, Array $rec  )

Adds this attribute to database queries.

Database queries (select, insert and update) are passed to this method so the attribute can 'hook' itself into the query.

Framework method. It should not be necessary to call this method directly. Derived attributes that consist of more than a single simple database field (like relations for example), may have to reimplement this method.

Parameters:
atkQuery   $query:  The SQL query object
String   $tablename:  The name of the table of this attribute
String   $fieldaliasprefix:  Prefix to use in front of the alias in the query.
Array   $rec:  The record that contains the value of this attribute.
int   $level:  Recursion level if relations point to eachother, an endless loop could occur if they keep loading eachothers data. The $level is used to detect this loop. If overriden in a derived class, any subcall to an addToQuery method should pass the $level+1.
String   $mode:  Indicates what kind of query is being processing: This can be any action performed on a node (edit, add, etc) Mind you that "add" and "update" are the actions that store something in the database, whereas the rest are probably select queries.
   &$query: 
   &$rec: 


Redefined in descendants as:

[ Top ]
addToSearchformFields  [line 2539]

  atkAttribute addToSearchformFields( &$fields, &$node, &$record, [array $fieldprefix = ""], [array $currentSearchMode = array()], array $fields, atkNode $node, array $record  )

Adds the needed searchbox(es) for this attribute to the fields array. This method should only be called by the atkSearchHandler.

Parameters:
array   $fields:  The array containing fields to use in the extended search
atkNode   $node:  The node where the field is in
array   $record:  A record containing default values to put into the search fields.
array   $fieldprefix:  search / mode field prefix
array   $currentSearchMode:  current search mode
   &$fields: 
   &$node: 
   &$record: 

API Tags:
Return:  The instance of this atkAttribute


Redefined in descendants as:

[ Top ]
addToViewArray  [line 1099]

  void addToViewArray( String $mode, &$arr, &$defaults, array $arr, array $defaults  )

Adds the attribute's view / hide HTML code to the view array.

This method is called by the node if it wants the data needed to create a view form.

This is a framework method, it should never be called directly.

Parameters:
String   $mode:  the mode ("view")
array   $arr:  pointer to the view array
array   $defaults:  pointer to the default values array
   &$arr: 
   &$defaults: 


Redefined in descendants as:

[ Top ]
db2value  [line 884]

  mixed db2value( array $rec  )

Converts a database value to an internal value.

For the regular atkAttribute Derived attributes may reimplement this for their own conversion. (In which case, the return type might be 'mixed')

This is the exact opposite of the value2db method.

Parameters:
array   $rec:  The database record that holds this attribute's value

API Tags:
Return:  The internal value


Redefined in descendants as:

[ Top ]
dbFieldSize  [line 2195]

  int dbFieldSize( )

Return the size of the field in the database.

If 0 is returned, the size is unknown. In this case, the return value should not be used to create table columns.

Ofcourse, the size does not make sense for every field type. So only interpret the result if a size has meaning for the field type of this attribute. (For example, if the database field is of type 'date', the size has no meaning)

Note that derived attributes might set a dot separated size, for example to store decimal numbers. The number after the dot should be interpreted as the number of decimals.


API Tags:
Return:  The database field size


Redefined in descendants as:

[ Top ]
dbFieldType  [line 2169]

  String dbFieldType( )

Return the database field type of the attribute.

Note that the type returned is a 'generic' type. Each database vendor might have his own types, therefor, the type should be converted to a database specific type using $db->fieldType().

If the type was read from the table metadata, that value will be used. Else, the attribute will analyze its flags to guess what type it should be. If AF_AUTO_INCREMENT is set, the field is probaly "number". If not, it's probably "string".

Note: Derived attributes should override this method if they use other field types than string or number. If the derived attribute is one that can not be stored in the database, an empty string should be returned.


API Tags:
Return:  The 'generic' type of the database field for this attribute.


Redefined in descendants as:

[ Top ]
delete  [line 1871]

  boolean delete( array $record  )

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

The regular atkAttribute has no implementation for this method, but derived attributes may override this, to take care of cleanups, cascade deletes etc. Note, that the framework only calls this method if the attribute has the AF_CASCADE_DELETE flag.

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

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


Redefined in descendants as:

[ Top ]
deleteAllowed  [line 2503]

  boolean deleteAllowed( )

Check if delete of the record is allowed.

This method is called by the framework to check if the attribute allows the record to be deleted. The default implementation always returns true, but derived attributes may implement their own logic to prevent deletion of the record.


API Tags:
Return:  True if delete is allowed, false if not.


Redefined in descendants as:

[ Top ]
display  [line 1763]

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

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

The regular atkAttribute uses PHP's nl2br() and htmlspecialchars() methods to prepare a value for display, unless $mode is "cvs".

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, "edit" for displaying in editscreens, "add" for displaying in add screens. "csv" for csv files. Applications can use additional modes.

API Tags:
Return:  HTML String


Redefined in descendants as:

[ Top ]
edit  [line 976]

  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.

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


Redefined in descendants as:

[ Top ]
equal  [line 1965]

  boolean equal( array $recA, array $recB  )

This function is called to compare if two records are considered equal by this attribute.

The regular atkAttribute performs a simple string match; derived classes may override this method to perform more complex comparisons.

Parameters:
array   $recA:  The first record holding a value for this attribute.
array   $recB:  The second record holding a value for the attribute.

API Tags:
Return:  True if the attribute considers the records equal, false if not.


Redefined in descendants as:

[ Top ]
escapeSQL  [line 2783]

  String escapeSQL( string $value, [boolean $wildcards = false]  )

Escape string for use in a query.

Parameters:
string   $value:  value to escape
boolean   $wildcards:  escape wildcards too?

API Tags:
Return:  The escaped value.


[ Top ]
extendedSort  [line 2603]

  String extendedSort( &$columnConfig, [String $fieldprefix = ''], [atkDataGrid $grid = null], atkColumnConfig $columnConfig  )

Retrieves the sort options and sort order.

Parameters:
atkColumnConfig   $columnConfig:  The config that contains options for extended sorting and grouping to a recordlist.
String   $fieldprefix:  The prefix of the attribute
atkDataGrid   $grid:  The grid that this attribute lives on.
   &$columnConfig: 

API Tags:
Return:  HTML


[ Top ]
fetchMeta  [line 1909]

  void fetchMeta( array $metadata  )

Fetch the metadata about this attrib from the table metadata, and process it.

Lengths for the edit and searchboxes, and maximum lengths are retrieved from the table metadata by this method.

Parameters:
array   $metadata:  The table metadata from the table for this attribute.


Redefined in descendants as:

[ Top ]
fetchValue  [line 941]

  String fetchValue( array $postvars  )

Convert values from an HTML form posting to an internal value for this attribute.

For the regular atkAttribute, this means getting the field with the same name as the attribute from the html posting.

Parameters:
array   $postvars:  The array with html posted values ($_POST, for example) that holds this attribute's value.

API Tags:
Return:  The internal value


Redefined in descendants as:

[ Top ]
fieldName  [line 825]

  String fieldName( )

Returns the name of the attribute.

For most attributes, this corresponds to the name of the field in the database. For some attributes though (like one2many relations), the name is a mere identifier within a node. This method always returns the attribute name, despite the 'field' prefix of the method.


API Tags:
Return:  fieldname


[ Top ]
formName  [line 836]

  String formName( )

Retrieve the name of the attribute in HTML forms.


API Tags:
Return:  Name of the attribute in HTML forms
Deprecated:  HTML formname and fieldname are equal, use fieldName instead.


[ Top ]
getAdditionalTabs  [line 2452]

  array getAdditionalTabs( String $action  )

Get list of additional tabs.

Attributes can add new tabs to tabbed screens. This method will be called to retrieve the tabs. The regular atkAttribute has no implementation for this method. Derived attributes may override this.

Parameters:
String   $action:  The action for which additional tabs should be loaded.

API Tags:
Return:  The list of tabs to add to the screen.


Redefined in descendants as:

[ Top ]
getAttributeHtmlId  [line 1081]

  String getAttributeHtmlId( )

Returns the html identifier of the attribute without setting it Created because getHtmlId would always SET the htmlid while getting it.


API Tags:
Return:  The HTML id of this attribute


[ Top ]
getColumn  [line 1262]

  string getColumn( )

Get column.


API Tags:
Return:  column name
Access:  public


[ Top ]
getCSSClassAttribute  [line 2992]

  String getCSSClassAttribute( [mixed $additionalclasses = array()]  )

Retrieve the attribute for the HTML-tag for this atkAttribute.

Parameters:
mixed   $additionalclasses:  A string or an array with classnames.

API Tags:
Return:  HTML The attributes classname(s)


[ Top ]
getCSSClasses  [line 2965]

  Array getCSSClasses( )

Retrieve the CSS classes that were registered for this attribute


API Tags:
Return:  A list of css classes


[ Top ]
getDb  [line 2764]

  atkDb 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.


API Tags:
Return:  database instance


[ Top ]
getDependencies  [line 2880]

  array getDependencies( )

Retrieve the dependees for this attribute.


API Tags:
Return:  Returns the list of dependees (callbacks) for this attribute.
Access:  public


[ Top ]
getEdit  [line 1397]

  String getEdit( String $mode, &$defaults, String $fieldprefix, array $defaults  )

Retrieve the HTML code for placing this attribute in an edit page.

The difference with the edit() method is that the edit() method just generates the HTML code for editing the attribute, while the getEdit() method is 'smart', and implements a hide/readonly policy based on flags and/or custom override methodes in the node. (<attributename>_edit() and <attributename>_display() methods)

Framework method, it should not be necessary to call this method directly.

Parameters:
String   $mode:  The edit mode ("add" or "edit")
array   $defaults:  The record holding the values for this attribute
String   $fieldprefix:  The fieldprefix to put in front of the name of any html form element for this attribute.
   &$defaults: 

API Tags:
Return:  the HTML code for this attribute that can be used in an editpage.


Redefined in descendants as:

[ Top ]
getEditCallback  [line 1360]

  mixed getEditCallback( )

Returns the edit callback (if set).


API Tags:
Return:  callback method
Access:  protected


[ Top ]
getError  [line 1433]

  boolean getError( array $errors  )

Check if this attribute has errors in the specified error list.

Parameters:
array   $errors:  The error list is one that is stored in the "atkerror" section of a record, for example generated by validate() methods.


Redefined in descendants as:

[ Top ]
getFlags  [line 684]

  int getFlags( )

Returns the full set of flags of the attribute.


API Tags:
Return:  The full set of flags


[ Top ]
getForceInsert  [line 1985]

  bool getForceInsert( )

Getter for wether or not an attribute is forced to insert


API Tags:
Return:  Wether or not an attribute is forced to insert


[ Top ]
getForceUpdate  [line 2017]

  bool getForceUpdate( )

Getter for wether or not an attribute is forced to update


API Tags:
Return:  Wether or not an attribute is forced to update


[ Top ]
getHtmlId  [line 1070]

  String getHtmlId( String $fieldprefix  )

Return the html identifier (id="") of the attribute. (unique within a

page)

Parameters:
String   $fieldprefix:  The fieldprefix to put in front of the name of any html form element for this attribute.

API Tags:
Return:  the HTML identifier.


[ Top ]
getLabel  [line 2285]

  String getLabel( [array $record = array()], [string $mode = '']  )

Get the HTML label of the attribute.

The difference with the label() method is that the label method always returns the HTML label, while the getLabel() method is 'smart', by taking the AF_NOLABEL and AF_BLANKLABEL flags into account.

Parameters:
array   $record:  The record holding the value for this attribute.
string   $mode:  The mode ("add", "edit" or "view")

API Tags:
Return:  The HTML compatible label for this attribute, or an empty string if the label should be blank, or NULL if no label at all should be displayed.


Redefined in descendants as:

[ Top ]
getModule  [line 2259]

  String getModule( )

Get the module that this attribute originated from.

By default, this is the module of the owning node of this attribute. However, if the attribute was added using a modifier from a different module, then the module that added the attribute is returned.


API Tags:
Return:  The name of the module of this attribute


[ Top ]
getOrderByStatement  [line 2715]

  String getOrderByStatement( [Array $extra = ''], [String $table = ''], [String $direction = 'ASC']  )

Retrieves the ORDER BY statement for this attribute's node.

Derived attributes may override this functionality to implement other ordering statements using the given parameters.

Parameters:
Array   $extra:  A list of attribute names to add to the order by statement
String   $table:  The table name (if not given uses the owner node's table name)
String   $direction:  Sorting direction (ASC or DESC)

API Tags:
Return:  The ORDER BY statement for this attribute


Redefined in descendants as:

[ Top ]
getOwnerInstance  [line 655]

  atkNode &getOwnerInstance( )

Returns the owner instance.


API Tags:
Return:  owner instance


[ Top ]
getSearchCondition  [line 1708]

  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.


Redefined in descendants as:

[ Top ]
getSearchFieldName  [line 2577]

  String getSearchFieldName( String $prefix  )

Retrieve the fieldname of the attribute in an atksearch form.

Parameters:
String   $prefix:  The prefix

API Tags:
Return:  Name of the attribute in an atksearch


[ Top ]
getSearchMode  [line 1635]

  String getSearchMode( [boolean $extended = false]  )

Retrieve the current set or default searchmode of this attribute

Parameters:
boolean   $extended:  Whether extended search is being used

API Tags:
Return:  the default searchmode for this attribute.


[ Top ]
getSearchModeFieldname  [line 2588]

  String getSearchModeFieldname( String $prefix  )

Retrieve the searchmode name of the attribute in an atksearch form.

Parameters:
String   $prefix:  The prefix

API Tags:
Return:  Name of the attribute in an atksearch


[ Top ]
getSearchModes  [line 2088]

  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


Redefined in descendants as:

[ Top ]
getSections  [line 1252]

  array getSections( )

retrieve the tabs and/or sections for this attribute.



[ Top ]
getTabs  [line 1218]

  array getTabs( [string $mode = ""]  )

retrieve the tabs for this attribute.

Parameters:
string   $mode: 


[ Top ]
getToolTip  [line 1340]

  String getToolTip( )

Retrieve the html/javascript code for showing the tooltip for this attribute.


API Tags:
Return:  HTML


[ Top ]
getView  [line 1317]

  String getView( String $mode, &$defaults, array $defaults  )

Retrieve the html code for placing this attribute in a view page.

Method is 'smart' and can be overridden in the node using the <attributename>_display() methods.

Framework method, it should not be necessary to call this method directly.

Parameters:
String   $mode:  The mode ("view")
array   $defaults:  The record holding the values for this attribute
   &$defaults: 

API Tags:
Return:  the HTML code for this attribute that can be used in a viewpage.


[ Top ]
getViewCallback  [line 1284]

  mixed getViewCallback( )

Returns the view callback (if set).


API Tags:
Return:  callback method
Access:  protected


[ Top ]
hasDisabledMode  [line 782]

  boolean hasDisabledMode( int $flag  )

Check if the attribute is disabled in some mode (use DISABLED_VIEW and DISABLED_EDIT flags).

Parameters:
int   $flag:  The flag you want to check


[ Top ]
hasFlag  [line 675]

  boolean hasFlag( int $flag  )

Check if the attribute has a certain flag.

Parameters:
int   $flag:  The flag you want to check


[ Top ]
hasStore  [line 2306]

  boolean hasStore( string $mode  )

This function is used to check whether a attribute has a store function or not.

It can be overridden to determine when to use store() and when not to use it.

Parameters:
string   $mode:  The storage mode ("add", "update" or null for all)

API Tags:
Return:  true if it has a store method or false if it hasn't.
Deprecated:  Use storageType($mode) instead, which has more detailed information about storage.


[ Top ]
hide  [line 1049]

  String hide( [array $record = ""], [String $fieldprefix = ""]  )

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

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.

API Tags:
Return:  A piece of htmlcode with hidden form elements that post this attribute's value without showing it.


Redefined in descendants as:
  • atkBoolAttribute::hide() : Returns a piece of html code for hiding this attribute in an HTML form, while still posting its value. (<input type="hidden">)
  • atkDateAttribute::hide() : Returns a piece of html code that can be used in a form to display hidden values for this attribute.
  • atkDateTimeAttribute::hide() : Returns a piece of html code for hiding this attribute in an HTML form, while still posting its value. (<input type="hidden">)
  • atkUpdateStampAttribute::hide() : Returns a piece of html code for hiding this attribute in an HTML form, while still posting its value. (<input type="hidden">)
  • atkHiddenAttribute::hide() : This method is called by the framework whenever an attribute needs to be rendered within a hidden form.
  • atkDurationAttribute::hide() : Returns a piece of html code for hiding this attribute in an HTML form, while still posting its value. (<input type="hidden">)
  • atkFileAttribute::hide() : Returns a piece of html code that can be used in a form to display hidden values for this attribute.
  • atkFuzzySearchAttribute::hide() : Dummy method to prevent loading/storing of data.
  • atkTagAttribute::hide() : Dummy implementation
  • atkMultiSelectAttribute::hide() : Returns a piece of html code for hiding this attribute in an HTML form, while still posting its value. (<input type="hidden">)
  • atkFlagAttribute::hide() : Returns a piece of html code for hiding this attribute in an HTML form, while still posting its value. (<input type="hidden">)
  • atkMlAttribute::hide() : Returns a piece of html code that can be used in a form to display hidden values for this attribute.
  • atkMlSelectorAttribute::hide() : Returns a piece of html code that can be used in a form to display hidden values for this attribute.
  • atkMlWrapper::hide() : Returns a piece of html code for hiding this attribute in an HTML form, while still posting its value. (<input type="hidden">)
  • atkNumberAttribute::hide() : Returns a piece of html code for hiding this attribute in an HTML form, while still posting its value. (<input type="hidden">)
  • atkPasswordAttribute::hide() : Returns a piece of html code that can be used in a form to display hidden values for this attribute.
  • atkProfileAttribute::hide() : Returns a piece of html code for hiding this attribute in an HTML form, while still posting its value. (<input type="hidden">)
  • atkTabbedPane::hide() : No function, but is necessary
  • atkTimeAttribute::hide() : Returns a piece of html code that can be used in a form to display hidden values for this attribute.
  • atkManyToManyRelation::hide() : Returns a piece of html code for hiding this attribute in an HTML form, while still posting its value. (<input type="hidden">)
  • atkManyToOneRelation::hide() : Returns a piece of html code for hiding this attribute in an HTML form, while still posting its value. (<input type="hidden">)
  • atkOneToManyRelation::hide() : Returns a piece of html code for hiding this attribute in an HTML form.
  • atkOneToOneRelation::hide() : Returns a piece of html code for hiding this attribute in an HTML form, while still posting its values. (<input type="hidden">)

[ Top ]
init  [line 1938]

  void init( )

This function is called right after the attribute is added to the node.

The regular atkAttribute has no implementation for this method, but derived attributes may override this method to perform custom initialization.



Redefined in descendants as:

[ Top ]
initDependencies  [line 2892]

  void initDependencies( &$record, string $fieldPrefix, string $mode, array $record  )

Initialize and calls the dependencies.

Parameters:
array   $record:  record
string   $fieldPrefix:  the prefix for this attribute in an HTML form
string   $mode:  add/edit mode
   &$record: 

API Tags:
Access:  public


[ Top ]
initialValue  [line 925]

  mixed initialValue( )

Initial value. Returns the initial value for this attribute which will be used in the add form etc.


API Tags:
Return:  initial value for this attribute


Redefined in descendants as:

[ Top ]
isEmpty  [line 846]

  boolean isEmpty( array $record  )

Check if a record has an empty value for this attribute.

Parameters:
array   $record:  The record that holds this attribute's value.


Redefined in descendants as:

[ Top ]
isInitialHidden  [line 3017]

  initially isInitialHidden( array $record  )

check whether initially hidden or not

Parameters:
array   $record:  the record

API Tags:
Return:  hidden


[ Top ]
isNotNullInDb  [line 1801]

  boolean isNotNullInDb( )

Checks if this attribute is really not null in the database.

This method does not look at the AF_OBLIGATORY flag, it only checks in the database if the attribute's column is really not null.


API Tags:
Return:  attribute's database column not null?


[ Top ]
isPosted  [line 899]

  boolean isPosted( array $postvars  )

Is there a value posted for this attribute?

Parameters:
array   $postvars: 

API Tags:
Return:  posted?


[ Top ]
label  [line 2221]

  String label( [array $record = array()]  )

Return the label of the attribute.

The regular atkAttribute does not make use of the $record parameter; The label is based on the attribute name, but is automatically translated. Derived attributes may override this behavior.

Parameters:
array   $record:  The record holding the value for this attribute.

API Tags:
Return:  HTML compatible label for this attribute


Redefined in descendants as:

[ Top ]
listHeaderSortOrder  [line 2691]

  String listHeaderSortOrder( &$columnConfig, atkColumnConfig $columnConfig  )

Retrieve the sortorder for the listheader based on the atkColumnConfig

Parameters:
atkColumnConfig   $columnConfig:  The config that contains options for extended sorting and grouping to a recordlist.
   &$columnConfig: 

API Tags:
Return:  Returns sort order ASC or DESC


Redefined in descendants as:

[ Top ]
loadType  [line 2418]

  int loadType( String $mode, [boolean $searching = false]  )

Determine the load type of this attribute.

With this method, the attribute tells the framework whether it wants to be loaded in the main query (addToQuery) or whether the attribute has its own load() implementation. The regular atkAttribute checks if a load() method is present, and returns POSTLOAD in this case, or ADDTOQUERY otherwise. Derived attributes may override this behavior.

Framework method. It should not be necesary to call this method directly.

Parameters:
String   $mode:  The type of load (view,admin,edit etc)
boolean   $searching:  ???

API Tags:
Return:  Bitmask containing information about load requirements. Note that since it is a bitmask, multiple load types could be returned at once. POSTLOAD - load() method must be called, after the master record is loaded. PRELOAD - load() must be called, before the master record is loaded. ADDTOQUERY - addtoquery() must be called, so the attribute can nest itself in the master query. NOLOAD - nor load(), nor addtoquery() should be called (attribute can not be loaded from the database)

Information Tags:
Todo:  add documentation about the searching argument. What does it do?

Redefined in descendants as:

[ Top ]
maxInputSize  [line 2435]

  int maxInputSize( )

Determine the maximum length an input field may be.



Redefined in descendants as:

[ Top ]
needsInsert  [line 2035]

  boolean needsInsert( array $record  )

This function is called by the framework to determine if the attribute needs to be saved to the database in an addDb call.

The regular atkAttribute returns false if the value is empty, or if AF_HIDE is set; true in other cases. Exception: when AF_AUTO_INCREMENT is set, the method always returns true. Derived attributes may override this behavior.

Parameters:
array   $record:  The record that is going to be saved

API Tags:
Return:  True if this attribute should participate in the add query; false if not.


[ Top ]
needsReload  [line 2073]

  boolean needsReload( array $record  )

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

Parameters:
array   $record:  The record that is going to be saved.

API Tags:
Return:  True if this attribute should be reloaded; false if not.


[ Top ]
needsUpdate  [line 2060]

  boolean needsUpdate( array $record  )

This function is called by the framework to determine if the attribute needs to be saved to the database in an updateDb call.

The regular atkAttribute returns false if AF_READONLY_EDIT or AF_HIDE_EDIT are set, but derived attributes may override this behavior.

Parameters:
array   $record:  The record that is going to be saved.

API Tags:
Return:  True if this attribute should participate in the update query; false if not.


Redefined in descendants as:

[ Top ]
observeJS  [line 3034]

  void observeJS( string $event, string $body  )

Observe the given JavaScript event and execute the given JavaScript statements when the event occurs.

Inside the JavaScript body the event is available in the variable "event" and the field identifier is available in the variable "fieldId". To cancel an event you can use Prototype's event mechanism for this.

Parameters:
string   $event:  event JavaScript event name (e.g. 'change', 'click', etc.)
string   $body:  body JavaScript body

API Tags:
Access:  public


[ Top ]
parseStringValue  [line 2521]

  mixed parseStringValue( String $stringvalue  )

Convert a String representation into an internal value.

Used by CSV imports and the like, to convert string values to internal values. This is somewhat similar to db2value, but this method should, when derived in other attributes, act 'smart' and treat the value as a user string. The default implementation returns the string unmodified, but derived classes may override this method to alter that behaviour.

Parameters:
String   $stringvalue:  The value to parse.

API Tags:
Return:  Internal value


Redefined in descendants as:

[ Top ]
partial  [line 2798]

  String partial( String $partial, String $mode  )

Handle a partial request for this attribute, different attributes support different partials.

Parameters:
String   $partial:  The name of the partial (i.e. refresh)
String   $mode:  The current add/edit mode

API Tags:
Return:  HTML Returns the result of the call to the partial handling method


[ Top ]
partial_dependencies  [line 2942]

  void partial_dependencies( )

Call dependencies for this attribute and output JavaScript.


API Tags:
Access:  public


[ Top ]
partial_refresh  [line 2816]

  String partial_refresh( String $mode  )

Partial method to refresh the add/edit field for this attribute.

Parameters:
String   $mode:  add/edit mode

API Tags:
Return:  HTML the output needed to refresh the attribute.


[ Top ]
postInit  [line 1949]

  void postInit( )

This function is called at the end of the node's init method.

The regular atkAttribute has no implementation for this method, but derived attributes may override this method to perform custom initialization.



Redefined in descendants as:

[ Top ]
preAddToEditArray  [line 1126]

  void preAddToEditArray( &$record, string $fieldPrefix, string $mode, array $record  )

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.

Parameters:
array   $record:  reference to the record
string   $fieldPrefix:  field prefix
string   $mode:  edit mode
   &$record: 

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
preAddToViewArray  [line 1138]

  void preAddToViewArray( &$record, string $mode, array $record  )

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.

Parameters:
array   $record:  reference to the record
string   $mode:  view mode
   &$record: 

API Tags:
Access:  public


[ Top ]
registerJavaScriptObservers  [line 954]

  void registerJavaScriptObservers( string $fieldId  )

Register JavaScript event handlers.

Parameters:
string   $fieldId:  field identifier

API Tags:
Access:  protected


[ Top ]
registerKeyListener  [line 2471]

  atkAttribute registerKeyListener( String $id, [int $navkeys = KB_CTRLCURSOR]  )

Register keyboard navigation for this attribute.

This method is called by the attribute itself to register the keyboard navigation, usually from its edit() method. The regular atkAttribute calls this method once for its default text input box. Derived classes may call this for any input box or control they have.

Parameters:
String   $id:  The unique HTML id of the form element to which navigation is added.
int   $navkeys:  The mask indicating which keys to support for navigation.

API Tags:
Return:  The instance of this atkAttribute


[ Top ]
removeDisabledMode  [line 806]

  atkAttribute removeDisabledMode( int $flag  )

Removes a disabled mode from the attribute.

Parameters:
int   $flag:  The flag to remove from the attribute

API Tags:
Return:  The instance of this atkAttribute


[ Top ]
removeFlag  [line 742]

  atkAttribute removeFlag( int $flag  )

Removes a flag from the attribute.

Note that removing flags at any time after the constructor might not always work. There are flags that have already been processed at constructor time, so removing them will be futile.

Parameters:
int   $flag:  The flag to remove from the attribute

API Tags:
Return:  The instance of this atkAttribute


[ Top ]
search  [line 1567]

  String search( [array $record = array()], [boolean $extended = false], [string $fieldprefix = ""], [atkDataGrid $grid = null]  )

Returns a piece of html code that can be used to get search terms input from the user.

The framework calls this method to display the searchbox in the search bar of the recordlist, and to display a more extensive search in the 'extended' search screen. The regular atkAttributes returns a simple text input box for entering a keyword to search for.

Parameters:
array   $record:  Array with values
boolean   $extended:  if set to false, a simple search input is returned for use in the searchbar of the recordlist. If set to true, a more extended search may be returned for the 'extended' search page. The atkAttribute does not make a difference for $extended is true, but derived attributes may reimplement this.
string   $fieldprefix:  The fieldprefix of this attribute's HTML element.
atkDataGrid   $grid: 

API Tags:
Return:  A piece of html-code
Access:  public

Information Tags:
Todo:  find a better way to search on onetomanys that does not require something evil in atkAttribute

Redefined in descendants as:

[ Top ]
searchCondition  [line 1685]

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

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

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: 


Redefined in descendants as:

[ Top ]
searchMode  [line 1596]

  string searchMode( [boolean $extended = false], [string $fieldprefix = '']  )

Returns piece of html which is used for setting/selecting the search mode for this attribute.

It will show a pulldown if using extended search and multiple searchmodes are supported otherwise the default searchmode is selected.

Parameters:
boolean   $extended:  using extended search?
string   $fieldprefix:  optional fieldprefix

API Tags:
Return:  html which is used for selecting searchmode
Access:  public


[ Top ]
setAttribSize  [line 2123]

  atkAttribute setAttribSize( mixed $size  )

Set the size(s) of the attribute

Parameters:
mixed   $size: 

The max. number of characters that can be entered. If not specified, or set to 0, the max. size is automatically retrieved from the table metadata.

By default, the size of the edit box is the same as the maximum number of chars that can be entered (as long as it fits on screen). You can however pass an array of 2 or 3 numbers instead of a single number. In this case, the array is interpreted as follows:

  • $size[0] - The maximum size that can be entered
  • $size[1] - The size of the input box in add/edit forms
  • $size[2] - The size of the search box
If $size[2] is not specified, $size[1] will be used instead. If $size[1] is not specified, or the passed value is not an array, all 3 sizes will default to the first value.

Note: The sizes that are actually used depend both on the specified size and the size of the field in the database. Usually, these are the same. In the case they differ, the smallest of the 2 will be used.


API Tags:
Return:  The instance of this atkAttribute


[ Top ]
setAttributeSearchmode  [line 1743]

  atkAttribute setAttributeSearchmode( String $searchmode  )

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.

Parameters:
String   $searchmode:  The searchmode we want to set on the attribute

API Tags:
Return:  The instance of this atkAttribute


[ Top ]
setColumn  [line 1273]

  atkAttribute setColumn( string $name  )

Set column.

Parameters:
string   $name:  column name

API Tags:
Return:  The instance of this atkAttribute
Access:  public


[ Top ]
setDisabledModes  [line 795]

  atkAttribute setDisabledModes( [int $flags = 0]  )

Sets the disabled mode flag of the attribute

Note that if you assign nothing or 0, this will remove all the flags from the attribute. You can assign multiple flags by using the pipe symbol. Setting the flags will overwrite all previous flag-settings.

Parameters:
int   $flags:  The flags to be set to the attribute.

API Tags:
Return:  The instance of this atkAttribute


[ Top ]
setEditCallback  [line 1373]

  void setEditCallback( mixed $callback  )

Sets the edit callback.

The callback is called instead of the regular display method of the attribute.

Parameters:
mixed   $callback:  callback method

API Tags:
Access:  public


[ Top ]
setFlags  [line 726]

  atkAttribute setFlags( [int $flags = 0]  )

Sets the flags of the attribute

Note that if you assign nothing or 0, this will remove all the flags from the attribute. You can assign multiple flags by using the pipe symbol. Setting the flags will overwrite all previous flag-settings.

Parameters:
int   $flags:  The flags to be set to the attribute.

API Tags:
Return:  The instance of this atkAttribute


[ Top ]
setForceInsert  [line 1975]

  atkAttribute setForceInsert( bool $force  )

Used to force an attribute to update with every addDb() call

Parameters:
bool   $force:  Wether or not to force the attribute to insert

API Tags:
Return:  Returns the instance of this attribute


[ Top ]
setForceReload  [line 1996]

  atkAttribute setForceReload( bool $force  )

Used to force an attribute to update from the db regardless of the

attribute being present in the postvars/session

Parameters:
bool   $force:  Wether or not to force the attribute to reload

API Tags:
Return:  Returns the instance of this attribute


[ Top ]
setForceUpdate  [line 2007]

  atkAttribute setForceUpdate( bool $force  )

Used to force an attribute to update with every updateDb() call

Parameters:
bool   $force:  Wether or not to force the attribute to update

API Tags:
Return:  Returns the instance of this attribute


[ Top ]
setInitialHidden  [line 3004]

  atkAttribute setInitialHidden( boolean $bool  )

Set whether initially hidden or not. A field is "hidden" by adding the class atkAttrRowHidden.

Parameters:
boolean   $bool:  Initially hidden?

API Tags:
Return:  The instance of this atkAttribute


[ Top ]
setInitialValue  [line 913]

  atkAttribute setInitialValue( mixed $value  )

Set initial value for this attribute.

NOTE: the initial value only works if there is no initial_values override in the node or if the override properly calls parent::initial_values!

Parameters:
mixed   $value:  initial value

API Tags:
Return:  The instance of this atkAttribute


Redefined in descendants as:
  • atkShuttleRelation::setInitialValue() : AtkShuttleRelation expect or an array whith primary keys of the destionation node or a single value that contains the primary key of the destination node.

[ Top ]
setLabel  [line 2232]

  atkAttribute setLabel( string $label  )

Set the label of the attribute

Parameters:
string   $label: 

API Tags:
Return:  The instance of this atkAttribute


[ Top ]
setLoadType  [line 2382]

  atkAttribute setLoadType( int $type, [string $mode = null]  )

Sets the load type.

Parameters:
int   $type:  Bitmask containg information about load requirements.
string   $mode:  The load mode ("view", "admin" etc. or null for all)

API Tags:
Return:  The instance of this atkAttribute
See:  atkAttribute::loadType()


[ Top ]
setOwnerInstance  [line 665]

  void setOwnerInstance( &$instance, atkNode $instance  )

Sets the owner instance.

Parameters:
atkNode   $instance: 
   &$instance: 


[ Top ]
setPostFixLabel  [line 2244]

  atkAttribute setPostFixLabel( string $label  )

Set the label of the attribute

Parameters:
string   $label: 

API Tags:
Return:  The instance of this atkAttribute


[ Top ]
setSections  [line 1233]

  atkAttribute setSections( array $sections  )

Put the attribute on one or more tabs and/or sections.

Example:

  1. $attribute->setSections(array('tab.section','tab.othersection));

Parameters:
array   $sections:  An array of tabs and/or sections on which the attribute should be displayed.

API Tags:
Return:  The instance of this atkAttribute


[ Top ]
setStorageType  [line 2324]

  atkAttribute setStorageType( int $type, [string $mode = null]  )

Sets the storage type.

Parameters:
int   $type:  Bitmask containg information about storage requirements.
string   $mode:  The storage mode ("add", "update" or null for all)

API Tags:
Return:  The instance of this atkAttribute
See:  atkAttribute::storageType()


[ Top ]
setTabs  [line 1198]

  atkAttribute setTabs( array $tabs  )

Put the attribute on one or more tabs.

Parameters:
array   $tabs:  An array of tabs on which the attribute should be displayed.

API Tags:
Return:  The instance of this atkAttribute


[ Top ]
setViewCallback  [line 1297]

  void setViewCallback( mixed $callback  )

Sets the view callback.

The callback is called instead of the regular display method of the attribute.

Parameters:
mixed   $callback:  callback method

API Tags:
Access:  public


[ Top ]
showOnTab  [line 2488]

  boolean showOnTab( String $tab  )

Check if the attribute wants to be shown on a certain tab.

Parameters:
String   $tab:  The name of the tab to check.


Redefined in descendants as:

[ Top ]
smartSearchCondition  [line 1658]

  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: 


Redefined in descendants as:

[ Top ]
sortOptions  [line 2620]

  String sortOptions( &$columnConfig, [String $fieldprefix = ''], [atkDataGrid $grid = null], atkColumnConfig $columnConfig  )

Retrieves the sort options for this attribute which is used in recordlists and search actions.

Parameters:
atkColumnConfig   $columnConfig:  The config that contains options for extended sorting and grouping to a recordlist.
String   $fieldprefix:  The prefix of the attribute
atkDataGrid   $grid:  The grid that this attribute lives on.
   &$columnConfig: 

API Tags:
Return:  HTML


[ Top ]
sortOrder  [line 2650]

  String sortOrder( &$columnConfig, [String $fieldprefix = ''], [atkDataGrid $grid = null], atkColumnConfig $columnConfig  )

Sets the sortorder options for this attribute which is used in recordlists and search actions.

Parameters:
atkColumnConfig   $columnConfig:  The config that contains options for extended sorting and grouping to a recordlist.
String   $fieldprefix:  The prefix of the attribute on HTML forms
atkDataGrid   $grid:  The grid that this attribute lives on.
   &$columnConfig: 

API Tags:
Return:  HTML


[ Top ]
storageType  [line 2357]

  int storageType( [String $mode = null]  )

Determine the storage type of this attribute.

With this method, the attribute tells the framework whether it wants to be stored in the main query (addToQuery) or whether the attribute has its own store() implementation. The regular atkAttribute checks if a store() method is present, and returns POSTSTORE in this case, or ADDTOQUERY otherwise. Derived attributes may override this behavior.

Framework method. It should not be necesary to call this method directly.

Parameters:
String   $mode:  The type of storage ("add" or "update")

API Tags:
Return:  Bitmask containing information about storage requirements. Note that since it is a bitmask, multiple storage types could be returned at once. POSTSTORE - store() method must be called, after the master record is saved. PRESTORE - store() must be called, before the master record is saved. ADDTOQUERY - addtoquery() must be called, so the attribute can nest itself in the master query. NOSTORE - nor store(), nor addtoquery() should be called (attribute can not be stored in the database)


Redefined in descendants as:

[ Top ]
sum  [line 1892]

  array sum( array $rec1, array $rec2, [String $fieldprefix = ""]  )

Calculate the sum of 2 records.

This is called by the framework for the auto-totalling feature. Two records are passed, and a record is returned. The reason that the params are entire records instead of plain values, is that derived classes or custom attributes may need information from other attributes too.

Parameters:
array   $rec1:  The first record
array   $rec2:  The second record
String   $fieldprefix:  The prefix that values in $rec1 and $rec2 have

API Tags:
Return:  A record containing the sum of $rec1 and $rec2


[ Top ]
text  [line 2745]

  String text( String $string, [ $fallback = true]  )

Translate using the owner instance's module and type.

Parameters:
String   $string:  The string to be translated
   $fallback: 

API Tags:
Return:  The translated string.
Access:  public


[ Top ]
validate  [line 1790]

  void validate( &$record, String $mode, array $record  )

Checks if a value is valid.

The regular atkAttribute has no specific validation. Derived attributes may override this method to perform custom validation. Note that obligatory and unique fields are checked by the atkNodeValidator, and not by the validate() method itself.

Parameters:
array   $record:  The record that holds the value for this attribute. If an error occurs, the error will be stored in the 'atkerror' field of the record.
String   $mode:  The mode for which should be validated ("add" or "update")
   &$record: 


Redefined in descendants as:

[ Top ]
value2db  [line 863]

  String value2db( array $rec  )

Converts the internal attribute value to one that is understood by the database.

For the regular atkAttribute, this means escaping things like quotes and slashes. Derived attributes may reimplement this for their own conversion. This is the exact opposite of the db2value method.

Parameters:
array   $rec:  The record that holds this attribute's value.

API Tags:
Return:  The database compatible value


Redefined in descendants as:

[ Top ]
_callDependencies  [line 2928]

  void _callDependencies( &$record, string $fieldPrefix, string $mode, boolean $initial, array $record  )

Calls the dependency callbacks for this attribute.

Parameters:
array   $record:  record
string   $fieldPrefix:  the prefix for this attribute in an HTML form
string   $mode:  add/edit mode
boolean   $initial:  initial call (e.g. non-javascript manipulation)
   &$record: 

API Tags:
Access:  protected


[ Top ]
_renderChangeHandler  [line 1025]

  void _renderChangeHandler( String $fieldprefix, [String $elementNr = ""]  )

Renders the onchange code on the page.

Parameters:
String   $fieldprefix:  The prefix to the field
String   $elementNr:  The number of the element when attribute contains multiple options

API Tags:
Access:  private


Redefined in descendants as:

[ Top ]
__toString  [line 3044]

  string __toString( )

String representation for this attribute (PHP5 only).


API Tags:
Return:  attribute name prefixed with node type


[ Top ]
Home | About | Contact