public static function Notifications_Object::build in Notifications 7
Build from type, value (can be a plain value or a Drupal object)
1 call to Notifications_Object::build()
- notifications_object in ./
notifications.module - Create a wrapped object and keep a static cache of created objects.
File
- ./
notifications.object.inc, line 122 - Drupal Notifications Framework - Default class file
Class
- Notifications_Object
- Wrapper for Drupal objects
Code
public static function build($type, $value = NULL) {
$class = self::type_info($type, 'class', 'Notifications_Drupal_Object');
$object = new $class(array(
'type' => $type,
));
if (isset($value)) {
$object
->set_value($value);
}
return $object;
}