class VariableObject in Business Rules 2.x
Same name and namespace in other branches
- 8 src/VariableObject.php \Drupal\business_rules\VariableObject
Class Variable to be used on BusinessRulesVariable plugins.
@package Drupal\business_rules
Hierarchy
- class \Drupal\business_rules\VariableObject
Expanded class hierarchy of VariableObject
17 files declare their use of VariableObject
- AddRoleToUser.php in src/
Plugin/ BusinessRulesAction/ AddRoleToUser.php - BusinessRulesItemPluginBase.php in src/
Plugin/ BusinessRulesItemPluginBase.php - BusinessRulesProcessor.php in src/
Util/ BusinessRulesProcessor.php - CalculateValue.php in src/
Plugin/ BusinessRulesAction/ CalculateValue.php - CustomValueVariable.php in src/
Plugin/ BusinessRulesVariable/ CustomValueVariable.php
File
- src/
VariableObject.php, line 10
Namespace
Drupal\business_rulesView source
class VariableObject {
/**
* The variable ID.
*
* @var string
*/
protected $id;
/**
* The variable value.
*
* @var mixed
*/
protected $value;
/**
* The variable type.
*
* @var string
*/
protected $type;
/**
* VariableObject constructor.
*
* @param string $id
* The variable id.
* @param mixed $value
* The variable value.
* @param string $type
* The variable type.
*/
public function __construct($id = NULL, $value = NULL, $type = NULL) {
$this
->setId($id);
$this
->setValue($value);
$this
->setType($type);
}
/**
* Get the variable id.
*
* @return string
* The variable id.
*/
public function getId() {
return $this->id;
}
/**
* Set the variable id.
*
* @param string $id
* The variable id.
*/
public function setId($id) {
$this->id = $id;
}
/**
* Get the variable value.
*
* @return mixed
* The variable value.
*/
public function getValue() {
return $this->value;
}
/**
* Set the variable value.
*
* @param mixed $value
* The variable value.
*/
public function setValue($value) {
$this->value = $value;
}
/**
* Get the variable type, usually the plugin id.
*
* @return string
* The variable type.
*/
public function getType() {
return $this->type;
}
/**
* Set the variable type, usually the plugin id..
*
* @param string $type
* The variable type.
*/
public function setType($type) {
$this->type = $type;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
VariableObject:: |
protected | property | The variable ID. | |
VariableObject:: |
protected | property | The variable type. | |
VariableObject:: |
protected | property | The variable value. | |
VariableObject:: |
public | function | Get the variable id. | |
VariableObject:: |
public | function | Get the variable type, usually the plugin id. | |
VariableObject:: |
public | function | Get the variable value. | |
VariableObject:: |
public | function | Set the variable id. | |
VariableObject:: |
public | function | Set the variable type, usually the plugin id.. | |
VariableObject:: |
public | function | Set the variable value. | |
VariableObject:: |
public | function | VariableObject constructor. |