« Back to Product

Documentation

RegisterAttributeBoolean

Require: IP-Symcon >= 5.1

 boolean RegisterAttributeBoolean (string $Name, boolean $DefaultValue) 

Parameters

Name

Name of the attribute

DefaultValue

Default value of the attribute

Returns

If the command succeeds, it returns TRUE, otherwise FALSE.

Description

This function creates an attribute of the type boolean with name Name and default value DefaultValue

Warning

This function can only be called in the Create method!

Example

public function Create() {

    // Don't delete or change this line.
    parent::Create();

    $this->RegisterAttributeBoolean("CurrentState", true);
    
}
Any questions?