function RulesPlugin::__sleep
2 calls to RulesPlugin::__sleep()
- RulesAbstractPlugin::__sleep in includes/
rules.core.inc - RulesContainerPlugin::__sleep in includes/
rules.core.inc
2 methods override RulesPlugin::__sleep()
- RulesAbstractPlugin::__sleep in includes/
rules.core.inc - RulesContainerPlugin::__sleep in includes/
rules.core.inc
File
-
includes/
rules.core.inc, line 1203
Class
- RulesPlugin
- Base class for rules plugins.
Code
public function __sleep() {
// Keep the id always as we need it for the recursion prevention.
$array = drupal_map_assoc(array(
'parent',
'id',
'elementId',
'weight',
'settings',
));
// Keep properties related to configurations if they are there.
$info = entity_get_info('rules_config');
$fields = array_merge($info['schema_fields_sql']['base table'], array(
'recursion',
'tags',
));
foreach ($fields as $key) {
if (isset($this->{$key})) {
$array[$key] = $key;
}
}
return $array;
}