atkTagAttribute atkTagAttribute(
string
$name, string
$destination, string
$destinationfield, string
$link, [int
$mode = TA_ADD], [int
$flags = 0], [int
$size = 0]
)
|
|
Constructor
Parameters:
|
string |
$name: |
|
|
string |
$destination: |
|
|
string |
$destinationfield: |
|
|
string |
$link: |
|
|
int |
$mode: |
|
|
int |
$flags: |
|
|
int |
$size: |
|
void addSearchFilter(
String
$filter, [String
$value = ""]
)
|
|
Adds a filter on the instance of the destination
Parameters:
|
String |
$filter: |
The fieldname you want to filter OR a SQL where clause expression. |
|
String |
$value: |
Required value. (Ommit this parameter if you pass an SQL expression for $filter.) |
Redefinition of:
- atkFuzzySearchAttribute::addSearchFilter()
- Adds a filter on the instance of the searchnode
string arrayToString(
array
$array
)
|
|
Convert array to string
Parameters:
|
array |
$array: |
The array to convert |
API Tags:
| Return: | String representation of the array |
mixed checkKeyDimension(
array
$key, [string
$field = "id"]
)
|
|
Checks if a key is not an array
Parameters:
|
array |
$key: |
field containing the key values |
|
string |
$field: |
field to return if an array |
API Tags:
bool createDestinationInstance(
)
|
|
Creates an instance of the node we are searching on and stores it
in a member variable ($this->m_destInstance)
API Tags:
| Return: | True if successful, false if not. |
Create instance of the intermediairy link node.
If succesful, the instance is stored in the m_linkInstance member variable.
API Tags:
| Return: | True if successful, false if not. |
the determineKeyName(
String
$name
)
|
|
Determine the name of the foreign key based on the name of the relation.
Parameters:
|
String |
$name: |
the name of the relation |
API Tags:
| Return: | probable name of the foreign key |
String display(
array
$record, [String
$mode = ""]
)
|
|
Returns a displayable string for this value, to be used in HTML pages.
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:
Redefinition of:
- atkAttribute::display()
- Returns a displayable string for this value, to be used in HTML pages.
string displayDefaultTags(
[string
$prefix = '']
)
|
|
Display default tags
Parameters:
API Tags:
| Return: | The HTML code to display the default tags |
String edit(
[array
$rec = ""], [String
$prefix = ""], [String
$mode = ""]
)
|
|
Returns a piece of html code that can be used in a form to edit this attribute's value.
Parameters:
|
array |
$rec: |
The record that holds the value for this attribute. |
|
String |
$prefix: |
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 |
Redefinition of:
- atkFuzzySearchAttribute::edit()
- Returns a piece of html code that can be used in a form to edit this attribute's value.
string fetchValue(
array
$vars
)
|
|
Fetch value.
Parameters:
API Tags:
| Return: | fetched value |
| Access: | public |
Redefinition of:
- atkAttribute::fetchValue()
- Convert values from an HTML form posting to an internal value for this attribute.
array getDestinationRecords(
mixed
$token
)
|
|
Get destination records
Parameters:
|
mixed |
$token: |
The value of the destinationfield to select |
API Tags:
| Return: | Array with records that match the token |
Get the name of the attribute of the intermediairy node that points to the master node.
API Tags:
| Return: | The name of the attribute. |
Array getMatches(
String
$searchstring
)
|
|
The actual function that does the searching
Parameters:
|
String |
$searchstring: |
The string to search for |
API Tags:
Redefinition of:
- atkFuzzySearchAttribute::getMatches()
- The actual function that does the searching
Get the keywords that did not match.
Get the name of the attribute of the intermediairy node that points to the node on the other side of the relation.
API Tags:
| Return: | The name of the attribute. |
void isValidKeyWord(
String
$keyword
)
|
|
A keyword field may not contain HTML or linefeeds
Parameters:
Determine the maximum length an input field may be.
Redefinition of:
- atkAttribute::maxInputSize()
- Determine the maximum length an input field may be.
string refillRecord(
array
$orgrec
)
|
|
Refill record
Parameters:
void setLocalKey(
String
$attributename
)
|
|
Change the name of the attribute of the intermediairy node that points to the master node.
Parameters:
|
String |
$attributename: |
The name of the attribute. |
void setRemoteKey(
String
$attributename
)
|
|
Change the name of the attribute of the intermediairy node that points to the node on the other side of the relation.
Parameters:
|
String |
$attributename: |
The name of the attribute. |
bool store(
atkDb
$db, array
$rec, string
$mode
)
|
|
Store the value of this attribute
Parameters:
|
atkDb |
$db: |
The database object |
|
array |
$rec: |
The record to store |
|
string |
$mode: |
The mode we're in |
API Tags:
| Return: | True if succesfull, false if not |
Redefinition of:
- atkFuzzySearchAttribute::store()
- Override the store method of this attribute to search
True validate(
&$rec, String
$mode, Array
$rec
)
|
|
Validate the input based on the current mode.
Parameters:
|
Array |
$rec: |
The record which holds the values to validate |
|
String |
$mode: |
The mode we're in |
|
|
&$rec: |
|
API Tags:
| Return: | on validation, False otherwise. |
Redefinition of:
- atkFuzzySearchAttribute::validate()
- Checks if a value is valid.
Get default tags from the database
API Tags:
| Return: | Array with default tag records |