function Notifications_Subscription::set_field in Notifications 6.4
Same name and namespace in other branches
- 7 notifications.subscription.inc \Notifications_Subscription::set_field()
Set a field.
- If the field has already a key (index) it will replace an existing one with the same key
- If not key, it will be added to the field list with an ordinary key generated
Parameters
$field: Field object with one or more of these properties: key, type, field, value
3 calls to Notifications_Subscription::set_field()
- Notifications_Subscription::add_field in includes/
notifications_subscription.class.inc - Add a new field with name, value
- Notifications_Subscription::add_fields in includes/
notifications_subscription.class.inc - Add field values to existing ones
- Notifications_Subscription::load_fields in includes/
notifications_subscription.class.inc - Load condition fields from db
File
- includes/
notifications_subscription.class.inc, line 514 - Drupal Notifications Framework - Default class file
Class
- Notifications_Subscription
- Message destination class
Code
function set_field($field, $replace = FALSE) {
if (!isset($field->key) || !$replace) {
$field->key = isset($this->fields) ? count($this->fields) : 0;
}
// Add to the fields array, may replace an old one
$this->fields[$field->key] = $field;
}