FusionDirectory
|
This class allow to handle easily a composite attribute. More...
Public Member Functions | |
__construct (string $description, string $ldapName, array $attributes, $readFormat, $writeFormat, string $acl='', string $label=NULL) | |
The constructor of CompositeAttribute. More... | |
![]() | |
__construct (string $label, string $description, string $ldapName, bool $required=FALSE, $defaultValue='', string $acl='') | |
The constructor of Attribute. More... | |
setParent (&$plugin) | |
Set the parent plugin for this attribute. More... | |
getParent () | |
Get parent plugin instance, if any. More... | |
getExample () | |
Get an example value. More... | |
setPostValue ($value) | |
Set the postValue. | |
fixPostValue ($value) | |
In case a treatment is needed on POSTÂ content. | |
resetToDefault () | |
Reset this attribute to its default value. | |
loadValue (array $attrs) | |
If in LDAP, loads this attribute value from the attrs array. | |
inputValue ($ldapValue) | |
Return the ldap value in the correct intern format value. More... | |
setManagedAttributes (array $mAttributes) | |
Set a list of attributes that are managed by this attributes. See FusionDirectory wiki for detailed documentation. | |
loadPostValue () | |
Update this attributes postValue depending of the $_POST values. | |
applyPostValue () | |
Apply this attribute postValue in value if this attribute is enabled. | |
computeLdapValue () | |
Computes LDAP value. | |
fillLdapValue (array &$attrs) | |
Fill LDAP value in the attrs array. | |
fillLdapValueHook (array &$attrs) | |
Post-modify the attrs array if needed (used for erasing managed attributes) | |
check () | |
Check the correctness of this attribute. | |
renderAttribute (array &$attributes, bool $readOnly, bool $readable, bool $writable) | |
Render this attribute form input(s) More... | |
serializeAttribute (array &$attributes, bool $form=TRUE) | |
Serialize this attribute for RPC requests. More... | |
deserializeValue ($value) | |
Apply value from RPC requests. More... | |
serializeValue ($value=NULL) | |
Serialize value for RPC requests. More... | |
renderAcl (string $display) | |
Add ACL information around display. More... | |
getAclInfo () | |
Get ACL information about the ACL we need to create. | |
Additional Inherited Members | |
![]() | |
loadAttrValue (array $attrs) | |
Loads this attribute value from the attrs array if present. More... | |
This class allow to handle easily a composite attribute.
That means this is only one attribute in the LDAP, but it is shown as several in the form. If you need something else than scanf and printf for reading and writing the values (for instance if you want to do a addition of several int attributes), you should inherit this class and write your own readValues and writeValues method
Definition at line 28 of file class_CompositeAttribute.inc.
__construct | ( | string | $description, |
string | $ldapName, | ||
array | $attributes, | ||
$readFormat, | |||
$writeFormat, | |||
string | $acl = '' , |
||
string | $label = NULL |
||
) |
The constructor of CompositeAttribute.
string | $description | A more detailed description for the attribute |
string | $ldapName | The name of the attribute in the LDAP (If it's not in the ldap, still provide a unique name) |
array | $attributes | The attributes that are parts of this composite attribute |
string | $readFormat | the preg_match format that's gonna be used in order to read values from LDAP |
string | $writeFormat | the printf format that's gonna be used in order to write values into LDAP |
string | $acl | The name of the acl for this attribute if he does not use its own. (Leave empty if he should use its own like most attributes do) |
?string | $label The label to show for this attribute. Only useful if you put this attribute inside a SetAttribute, or if you use a specific template that needs it. |
Definition at line 45 of file class_CompositeAttribute.inc.