Class: atkFlagAttribute
Source Location: /attributes/class.atkflagattribute.inc
Class atkFlagAttribute
Inherited from parent
|
Inherited From atkMultiSelectAttribute
-
atkMultiSelectAttribute::$m_cols
-
-
atkMultiSelectAttribute::$m_fieldSeparator
-
Inherited From atkListAttribute
-
atkListAttribute::$m_emptyvalue
-
-
atkListAttribute::$m_lookup
-
-
atkListAttribute::$m_onchangehandler_init
-
-
atkListAttribute::$m_options
-
-
atkListAttribute::$m_selected
-
-
atkListAttribute::$m_types
-
-
atkListAttribute::$m_values
-
-
atkListAttribute::$m_width
-
Inherited From atkAttribute
-
atkAttribute::$m_column
-
-
atkAttribute::$m_cssclasses
-
-
atkAttribute::$m_dbfieldtype
-
-
atkAttribute::$m_dependees
-
-
atkAttribute::$m_disabledModes
-
-
atkAttribute::$m_flags
-
-
atkAttribute::$m_forceinsert
-
-
atkAttribute::$m_forceupdate
-
-
atkAttribute::$m_htmlid
-
-
atkAttribute::$m_index
-
-
atkAttribute::$m_initialValue
-
-
atkAttribute::$m_initial_hidden
-
-
atkAttribute::$m_label
-
-
atkAttribute::$m_loadType
-
-
atkAttribute::$m_manual_paint
-
-
atkAttribute::$m_maxsize
-
-
atkAttribute::$m_module
-
-
atkAttribute::$m_name
-
-
atkAttribute::$m_onchangecode
-
-
atkAttribute::$m_order
-
-
atkAttribute::$m_owner
-
-
atkAttribute::$m_ownerInstance
-
-
atkAttribute::$m_searchmode
-
-
atkAttribute::$m_searchsize
-
-
atkAttribute::$m_sections
-
-
atkAttribute::$m_size
-
-
atkAttribute::$m_storageType
-
-
atkAttribute::$m_tabs
-
|
Inherited From atkMultiSelectAttribute
-
atkMultiSelectAttribute::atkMultiSelectAttribute()
-
Constructor
-
atkMultiSelectAttribute::db2value()
-
Converts a database value to an internal value.
-
atkMultiSelectAttribute::dbFieldType()
-
Return the database field type of the attribute.
-
atkMultiSelectAttribute::display()
-
Returns a displayable string for this value, to be used in HTML pages.
-
atkMultiSelectAttribute::edit()
-
Returns a piece of html code that can be used in a form to edit this attribute's value.
-
atkMultiSelectAttribute::getSearchCondition()
-
-
atkMultiSelectAttribute::getSearchModes()
-
Retrieve the list of searchmodes supported by the attribute.
-
atkMultiSelectAttribute::hide()
-
Returns a piece of html code for hiding this attribute in an HTML form, while still posting its value. (<input type="hidden">)
-
atkMultiSelectAttribute::isEmpty()
-
Check if a record has an empty value for this attribute.
-
atkMultiSelectAttribute::setFieldSeparator()
-
Allows you to set the field separator
-
atkMultiSelectAttribute::value2db()
-
Converts the internal attribute value to one that is understood by the database.
-
atkMultiSelectAttribute::_addLinks()
-
Add the checkall, checknone and checkinvert links
Inherited From atkListAttribute
-
atkListAttribute::atkListAttribute()
-
Constructor.
-
atkListAttribute::addOption()
-
Add option/value to dropdown
-
atkListAttribute::createLookupArray()
-
Creates a lookup array to speedup translations
-
atkListAttribute::dbFieldType()
-
Return the database field type of the attribute.
-
atkListAttribute::display()
-
Display's text version of Record
-
atkListAttribute::edit()
-
Returns a piece of html code that can be used in a form to edit this attribute's value.
-
atkListAttribute::getEmptyValue()
-
Gets the value for the empty entry in the list attribute
-
atkListAttribute::getLookup()
-
Get functions to access the member variable for lookup.
-
atkListAttribute::getOptions()
-
Get function to access the member variable for options.
-
atkListAttribute::getSearchCondition()
-
Creates a searchcondition for the field, was once part of searchCondition, however, searchcondition() also immediately adds the search condition.
-
atkListAttribute::getSearchModes()
-
Retrieve the list of searchmodes supported by the attribute.
-
atkListAttribute::getSelected()
-
Gets the selected listattribute
-
atkListAttribute::getValues()
-
Get functions to access the member variable for values For backwards compatibility we also check the old member variable m_values
-
atkListAttribute::getWidth()
-
Gets the width of the dropdown list in pixels
-
atkListAttribute::parseStringValue()
-
Convert a String representation into an internal value.
-
atkListAttribute::removeOption()
-
Remove option from dropdown
-
atkListAttribute::removeValue()
-
Remove value from dropdown
-
atkListAttribute::search()
-
Returns a piece of html code that can be used to get search terms input from the user.
-
atkListAttribute::setAutoHide()
-
Set autohide for the given attribute
-
atkListAttribute::setEmptyValue()
-
Sets the value for the empty entry in the list attribute In normal cases you would just leave this empty, but certain cases might demand you set a value.
-
atkListAttribute::setOptions()
-
Set the option and value array
-
atkListAttribute::setSelected()
-
Sets the selected listitem
-
atkListAttribute::setWidth()
-
Set the width of the dropdown list in pixels
-
atkListAttribute::_addEmptyListOption()
-
If this attribute is NOT obligatory
-
atkListAttribute::_get()
-
Returns one of the following arrays
-
atkListAttribute::_set()
-
Set's one of the following arrays
-
atkListAttribute::_translateValue()
-
Translates the database value
Inherited From atkAttribute
-
atkAttribute::atkAttribute()
-
Constructor
-
atkAttribute::addCSSClass()
-
Add a CSS class for this attribute on an HTML form.
-
atkAttribute::addDependee()
-
Indicate that another attribute depends on this attribute, and that if this attribute is updated, the dependent attribute needs to be updated as well.
-
atkAttribute::addDisabledMode()
-
Adds a disabled mode flag to the attribute (use DISABLED_VIEW and DISABLED_EDIT flags).
-
atkAttribute::addFlag()
-
Adds a flag to the attribute.
-
atkAttribute::addOnChangeHandler()
-
Add a javascript onchange event handler.
-
atkAttribute::addToEditArray()
-
Adds the attribute's edit / hide HTML code to the edit array.
-
atkAttribute::addToListArrayHeader()
-
Adds the attribute / field to the list header. This includes the column name and search field.
-
atkAttribute::addToListArrayRow()
-
Adds the attribute / field to the list row. And if the row is totalisable also to the total.
-
atkAttribute::addToQuery()
-
Adds this attribute to database queries.
-
atkAttribute::addToSearchformFields()
-
Adds the needed searchbox(es) for this attribute to the fields array. This method should only be called by the atkSearchHandler.
-
atkAttribute::addToViewArray()
-
Adds the attribute's view / hide HTML code to the view array.
-
atkAttribute::db2value()
-
Converts a database value to an internal value.
-
atkAttribute::dbFieldSize()
-
Return the size of the field in the database.
-
atkAttribute::dbFieldType()
-
Return the database field type of the attribute.
-
atkAttribute::delete()
-
The delete method is called by the framework to inform the attribute that a record is deleted.
-
atkAttribute::deleteAllowed()
-
Check if delete of the record is allowed.
-
atkAttribute::display()
-
Returns a displayable string for this value, to be used in HTML pages.
-
atkAttribute::edit()
-
Returns a piece of html code that can be used in a form to edit this attribute's value.
-
atkAttribute::equal()
-
This function is called to compare if two records are considered equal by this attribute.
-
atkAttribute::escapeSQL()
-
Escape string for use in a query.
-
atkAttribute::extendedSort()
-
Retrieves the sort options and sort order.
-
atkAttribute::fetchMeta()
-
Fetch the metadata about this attrib from the table metadata, and process it.
-
atkAttribute::fetchValue()
-
Convert values from an HTML form posting to an internal value for this attribute.
-
atkAttribute::fieldName()
-
Returns the name of the attribute.
-
atkAttribute::formName()
-
Retrieve the name of the attribute in HTML forms.
-
atkAttribute::getAdditionalTabs()
-
Get list of additional tabs.
-
atkAttribute::getAttributeHtmlId()
-
Returns the html identifier of the attribute without setting it Created because getHtmlId would always SET the htmlid while getting it.
-
atkAttribute::getColumn()
-
Get column.
-
atkAttribute::getCSSClassAttribute()
-
Retrieve the attribute for the HTML-tag for this atkAttribute.
-
atkAttribute::getCSSClasses()
-
Retrieve the CSS classes that were registered for this attribute
-
atkAttribute::getDb()
-
Get database instance for this attribute. Will return the owner instance database instance unless the owner instance is not set in which case the default instance will be returned.
-
atkAttribute::getDependees()
-
Retrieve the dependees for this attribute.
-
atkAttribute::getEdit()
-
Retrieve the HTML code for placing this attribute in an edit page.
-
atkAttribute::getError()
-
Check if this attribute has errors in the specified error list.
-
atkAttribute::getFlags()
-
Returns the full set of flags of the attribute.
-
atkAttribute::getForceInsert()
-
Getter for wether or not an attribute is forced to insert
-
atkAttribute::getForceUpdate()
-
Getter for wether or not an attribute is forced to update
-
atkAttribute::getHtmlId()
-
Return the html identifier (id="") of the attribute. (unique within a
-
atkAttribute::getLabel()
-
Get the HTML label of the attribute.
-
atkAttribute::getModule()
-
Get the module that this attribute originated from.
-
atkAttribute::getOrderByStatement()
-
Retrieves the ORDER BY statement for this attribute's node.
-
atkAttribute::getOwnerInstance()
-
Returns the owner instance.
-
atkAttribute::getRefreshCall()
-
Returns a JavaScript call for refreshing this attribute.
-
atkAttribute::getSearchCondition()
-
Creates a searchcondition for the field, was once part of searchCondition, however, searchcondition() also immediately adds the search condition.
-
atkAttribute::getSearchFieldName()
-
Retrieve the fieldname of the attribute in an atksearch form.
-
atkAttribute::getSearchMode()
-
Retrieve the current set or default searchmode of this attribute
-
atkAttribute::getSearchModeFieldname()
-
Retrieve the searchmode name of the attribute in an atksearch form.
-
atkAttribute::getSearchModes()
-
Retrieve the list of searchmodes supported by the attribute.
-
atkAttribute::getSections()
-
retrieve the tabs and/or sections for this attribute.
-
atkAttribute::getTabs()
-
retrieve the tabs for this attribute.
-
atkAttribute::getToolTip()
-
Retrieve the html/javascript code for showing the tooltip for this attribute.
-
atkAttribute::getView()
-
Retrieve the html code for placing this attribute in a view page.
-
atkAttribute::hasDisabledMode()
-
Check if the attribute is disabled in some mode (use DISABLED_VIEW and DISABLED_EDIT flags).
-
atkAttribute::hasFlag()
-
Check if the attribute has a certain flag.
-
atkAttribute::hasStore()
-
This function is used to check whether a attribute has a store function or not.
-
atkAttribute::hide()
-
Returns a piece of html code for hiding this attribute in an HTML form, while still posting its value. (<input type="hidden">)
-
atkAttribute::init()
-
This function is called right after the attribute is added to the node.
-
atkAttribute::initialValue()
-
Initial value. Returns the initial value for this attribute which will be used in the add form etc.
-
atkAttribute::isDepending()
-
Check whether this attribute depends on other attributes.
-
atkAttribute::isEmpty()
-
Check if a record has an empty value for this attribute.
-
atkAttribute::isInitialHidden()
-
check whether initially hidden or not
-
atkAttribute::isManualPaint()
-
Check wether this attribute should be manually painted (call the edit method) or not.
-
atkAttribute::isNotNullInDb()
-
Checks if this attribute is really not null in the database.
-
atkAttribute::isPosted()
-
Is there a value posted for this attribute?
-
atkAttribute::label()
-
Return the label of the attribute.
-
atkAttribute::listHeaderSortOrder()
-
Retrieve the sortorder for the listheader based on the atkColumnConfig
-
atkAttribute::loadType()
-
Determine the load type of this attribute.
-
atkAttribute::maxInputSize()
-
Determine the maximum length an input field may be.
-
atkAttribute::needsInsert()
-
This function is called by the framework to determine if the attribute needs to be saved to the database in an addDb call.
-
atkAttribute::needsUpdate()
-
This function is called by the framework to determine if the attribute needs to be saved to the database in an updateDb call.
-
atkAttribute::parseStringValue()
-
Convert a String representation into an internal value.
-
atkAttribute::partial()
-
Handle a partial request for this attribute, different attributes support different partials.
-
atkAttribute::partial_refresh()
-
Partial method to refresh the add/edit field for this attribute.
-
atkAttribute::postInit()
-
This function is called at the end of the node's init method.
-
atkAttribute::registerKeyListener()
-
Register keyboard navigation for this attribute.
-
atkAttribute::removeDisabledMode()
-
Removes a disabled mode from the attribute.
-
atkAttribute::removeFlag()
-
Removes a flag from the attribute.
-
atkAttribute::search()
-
Returns a piece of html code that can be used to get search terms input from the user.
-
atkAttribute::searchCondition()
-
Creates a search condition for a given search value, and adds it to the query that will be used for performing the actual search.
-
atkAttribute::searchMode()
-
Returns piece of html which is used for setting/selecting the search mode for this attribute.
-
atkAttribute::setAttribSize()
-
Set the size(s) of the attribute
-
atkAttribute::setAttributeSearchmode()
-
Sets the searchmode for an attribute This will cause attributes that respect this to use the attributes searchmode for that particulair attribute instead of the general searchmode.
-
atkAttribute::setColumn()
-
Set column.
-
atkAttribute::setDisabledModes()
-
Sets the disabled mode flag of the attribute
-
atkAttribute::setFlags()
-
Sets the flags of the attribute
-
atkAttribute::setForceInsert()
-
Used to force an attribute to update with every addDb() call
-
atkAttribute::setForceUpdate()
-
Used to force an attribute to update with every updateDb() call
-
atkAttribute::setInitialHidden()
-
Set whether initially hidden or not. A field is "hidden" by adding the class atkAttrRowHidden.
-
atkAttribute::setInitialValue()
-
Set initial value for this attribute.
-
atkAttribute::setLabel()
-
Set the label of the attribute
-
atkAttribute::setLoadType()
-
Sets the load type.
-
atkAttribute::setManualPaint()
-
Set wether the edit() method of this attribute should be called by the framework, or if the edit method is called manually.
-
atkAttribute::setOwnerInstance()
-
Sets the owner instance.
-
atkAttribute::setSections()
-
Put the attribute on one or more tabs and/or sections.
-
atkAttribute::setStorageType()
-
Sets the storage type.
-
atkAttribute::setTabs()
-
Put the attribute on one or more tabs.
-
atkAttribute::showOnTab()
-
Check if the attribute wants to be shown on a certain tab.
-
atkAttribute::smartSearchCondition()
-
Creates a smart search condition for a given search value, and adds it to the query that will be used for performing the actual search.
-
atkAttribute::sortOptions()
-
Retrieves the sort options for this attribute which is used in recordlists and search actions.
-
atkAttribute::sortOrder()
-
Sets the sortorder options for this attribute which is used in recordlists and search actions.
-
atkAttribute::storageType()
-
Determine the storage type of this attribute.
-
atkAttribute::sum()
-
Calculate the sum of 2 records.
-
atkAttribute::text()
-
Translate using the owner instance's module and type.
-
atkAttribute::validate()
-
Checks if a value is valid.
-
atkAttribute::value2db()
-
Converts the internal attribute value to one that is understood by the database.
-
atkAttribute::_registerDependees()
-
Register change handlers for dependees.
-
atkAttribute::_renderChangeHandler()
-
Renders the onchange code on the page.
-
atkAttribute::__toString()
-
String representation for this attribute (PHP5 only).
|
Method Summary
| mixed |
db2value() |
Converts a database value to an internal value. |
| String |
dbFieldType() |
Return the database field type of the attribute. |
| String |
fetchValue() |
Convert values from an HTML form posting to an internal value for this attribute. |
| String |
getSearchCondition() |
Creates a searchcondition for the field, was once part of searchCondition, however, searchcondition() also immediately adds the search condition. |
| array |
getSearchModes() |
Retrieve the list of searchmodes supported by the attribute. |
| String |
hide() |
Returns a piece of html code for hiding this attribute in an HTML form, while still posting its value. (<input type="hidden">) |
| String |
value2db() |
Converts the internal attribute value to one that is understood by the database. |
Methods
atkFlagAttribute atkFlagAttribute(
string
$name, array
$optionArray, [array
$valueArray = ""], [int
$cols = ""], [int
$flags = 0], [int
$size = ""]
)
|
|
Constructor
Parameters:
|
string |
$name: |
Name of the attribute |
|
array |
$optionArray: |
Array with options |
|
array |
$valueArray: |
Array with values. If you don't use this parameter, values are assumed to be the same as the options. |
|
int |
$cols: |
Number of columns |
|
int |
$flags: |
Flags for this attribute |
|
int |
$size: |
Size of the attribute. |
mixed db2value(
array
$rec
)
|
|
Converts a database value to an internal value.
Parameters:
|
array |
$rec: |
The database record that holds this attribute's value |
API Tags:
| Return: | The internal value |
Redefinition of:
- atkMultiSelectAttribute::db2value()
- Converts a database value to an internal value.
Return the database field type of the attribute.
API Tags:
| Return: | The 'generic' type of the database field for this attribute. |
Redefinition of:
- atkMultiSelectAttribute::dbFieldType()
- Return the database field type of the attribute.
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 |
Redefinition of:
- atkAttribute::fetchValue()
- Convert values from an HTML form posting to an internal value for this attribute.
String getSearchCondition(
&$query, String
$table, mixed
$value, String
$searchmode, atkQuery
$query
)
|
|
Creates a searchcondition for the field, was once part of searchCondition, however, searchcondition() also immediately adds the search condition.
Parameters:
|
atkQuery |
$query: |
The query object where the search condition should be placed on |
|
String |
$table: |
The name of the table in which this attribute is stored |
|
mixed |
$value: |
The value the user has entered in the searchbox |
|
String |
$searchmode: |
The searchmode to use. This can be any one of the supported modes, as returned by this attribute's getSearchModes() method. |
|
|
&$query: |
|
API Tags:
| Return: | The searchcondition to use. |
Redefinition of:
- atkMultiSelectAttribute::getSearchCondition()
Retrieve the list of searchmodes supported by the attribute.
API Tags:
| Return: | List of supported searchmodes |
Redefinition of:
- atkMultiSelectAttribute::getSearchModes()
- Retrieve the list of searchmodes supported by the attribute.
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. |
Redefinition of:
- atkMultiSelectAttribute::hide()
- Returns a piece of html code for hiding this attribute in an HTML form, while still posting its value. (<input type="hidden">)
String value2db(
array
$rec
)
|
|
Converts the internal attribute value to one that is understood by the database.
Parameters:
|
array |
$rec: |
The record that holds this attribute's value. |
API Tags:
| Return: | The database compatible value |
Redefinition of:
- atkMultiSelectAttribute::value2db()
- Converts the internal attribute value to one that is understood by the database.