function WysiwygProfileController::attachLoad in Wysiwyg 7.2
Overrides DrupalDefaultEntityController::attachLoad().
Overrides DrupalDefaultEntityController::attachLoad
File
- ./
wysiwyg.module, line 36
Class
- WysiwygProfileController
- Controller class for Wysiwyg profiles.
Code
function attachLoad(&$queried_entities, $revision_id = FALSE) {
// Unserialize the profile settings.
foreach ($queried_entities as $key => $record) {
$settings = unserialize($record->settings);
// Profile preferences are stored with the editor settings to avoid adding
// an extra table column.
if (isset($settings['_profile_preferences'])) {
$preferences = $settings['_profile_preferences'];
unset($settings['_profile_preferences']);
}
else {
$preferences = array();
}
$queried_entities[$key]->settings = $settings;
$queried_entities[$key]->preferences = $preferences;
// @todo Store the name in the profile when allowing more than one per
// format.
$queried_entities[$key]->name = 'format' . $record->format;
}
// Call the default attachLoad() method.
parent::attachLoad($queried_entities, $revision_id);
}