Detailed Description
Instances of AttributeDescription describe attributes of PersistentObjects.
Definition at line 18 of file AttributeDescription.php.
Public Member Functions | |
__construct ($name, $type, array $tags, $defaultValue, $validateType, $validateDescription, $isEditable, $inputType, $displayType) | |
hasTag ($tag) | |
matchTags (array $tags=[], $matchMode='all') | |
getPropertyNames () | |
getName () | |
getType () | |
getTags () | |
getDefaultValue () | |
getValidateType () | |
getValidateDescription () | |
getIsEditable () | |
getInputType () | |
getDisplayType () | |
Protected Attributes | |
$name = '' | |
$type = 'String' | |
$tags = [] | |
$defaultValue = null | |
$validateType = '' | |
$validateDescription = '' | |
$isEditable = true | |
$inputType = 'text' | |
$displayType = 'text' | |
Constructor & Destructor Documentation
◆ __construct()
__construct | ( | $name, | |
$type, | |||
array | $tags, | ||
$defaultValue, | |||
$validateType, | |||
$validateDescription, | |||
$isEditable, | |||
$inputType, | |||
$displayType | |||
) |
Constructor.
- Parameters
-
$name The attribute name $type The attribute type $tags An array of application specific tags that this attribute is tagged with $defaultValue The default value (will be set when creating a blank object, see PersistenceMapper::create()) $validateType A validation type for the value $validateDescription A description for the validation type $isEditable Boolean whether the attribute should be editable, see Control::render() $inputType The input type for the value, see Control::render() $displayType The display type for the value
Definition at line 42 of file AttributeDescription.php.
Member Function Documentation
◆ hasTag()
hasTag | ( | $tag | ) |
Check if this attribute has the given application specific tag.
- Parameters
-
$tag Tag that the attribute should have
- Returns
- Boolean
Definition at line 60 of file AttributeDescription.php.
◆ matchTags()
matchTags | ( | array | $tags = [] , |
$matchMode = 'all' |
|||
) |
Check if this attribute is tagged with the given application specific tags.
- Parameters
-
$tags An array of tags that the attribute should match. Empty array results in true the given matchMode (default: empty array) $matchMode One of 'all', 'none', 'any', defines how the attribute's tags should match the given tags (default: 'all')
- Returns
- True if the attribute tags satisfy the match mode, false else
Definition at line 70 of file AttributeDescription.php.
◆ getPropertyNames()
getPropertyNames | ( | ) |
Return an array of property names defined in this attribute description.
- Returns
- An array of names
Definition at line 95 of file AttributeDescription.php.
◆ getName()
getName | ( | ) |
Get the attribute name.
- Returns
- String
Reimplemented in ReferenceDescription, and TransientAttributeDescription.
Definition at line 104 of file AttributeDescription.php.
◆ getType()
getType | ( | ) |
Get the attribute type.
- Returns
- String
Reimplemented in ReferenceDescription, and TransientAttributeDescription.
Definition at line 112 of file AttributeDescription.php.
◆ getTags()
getTags | ( | ) |
Get the application specific tags that this attribute is tagged with.
- Returns
- Array of String
Reimplemented in ReferenceDescription.
Definition at line 120 of file AttributeDescription.php.
◆ getDefaultValue()
getDefaultValue | ( | ) |
Get the default value.
- Returns
- Mixed
Reimplemented in ReferenceDescription.
Definition at line 128 of file AttributeDescription.php.
◆ getValidateType()
getValidateType | ( | ) |
Get the validation type for the value.
- Returns
- String
Reimplemented in ReferenceDescription.
Definition at line 136 of file AttributeDescription.php.
◆ getValidateDescription()
getValidateDescription | ( | ) |
Get the description for the validation type.
- Returns
- String
Reimplemented in ReferenceDescription.
Definition at line 144 of file AttributeDescription.php.
◆ getIsEditable()
getIsEditable | ( | ) |
Check whether the attribute should be editable.
- Returns
- Boolean
Reimplemented in ReferenceDescription.
Definition at line 152 of file AttributeDescription.php.
◆ getInputType()
getInputType | ( | ) |
Get the input type for the value.
- Returns
- String
Reimplemented in ReferenceDescription.
Definition at line 160 of file AttributeDescription.php.
◆ getDisplayType()
getDisplayType | ( | ) |
Get the display type for the value.
- Returns
- String
Reimplemented in ReferenceDescription.
Definition at line 168 of file AttributeDescription.php.
Member Data Documentation
◆ $name
|
protected |
Definition at line 20 of file AttributeDescription.php.
◆ $type
|
protected |
Definition at line 21 of file AttributeDescription.php.
◆ $tags
|
protected |
Definition at line 22 of file AttributeDescription.php.
◆ $defaultValue
|
protected |
Definition at line 23 of file AttributeDescription.php.
◆ $validateType
|
protected |
Definition at line 24 of file AttributeDescription.php.
◆ $validateDescription
|
protected |
Definition at line 25 of file AttributeDescription.php.
◆ $isEditable
|
protected |
Definition at line 26 of file AttributeDescription.php.
◆ $inputType
|
protected |
Definition at line 27 of file AttributeDescription.php.
◆ $displayType
|
protected |
Definition at line 28 of file AttributeDescription.php.