You are here

function ckeditor_profile_features_export in CKEditor - WYSIWYG HTML editor 6

Same name and namespace in other branches
  1. 7 includes/ckeditor.features.inc \ckeditor_profile_features_export()

Implementation of hook_features_export()

File

includes/ckeditor.features.inc, line 51
CKEditor - The text editor for the Internet - http://ckeditor.com Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.

Code

function ckeditor_profile_features_export($data, &$export, $module_name = '') {
  $pipe = array();
  foreach ((array) $data as $name) {
    $profile = ckeditor_profile_load($name);
    if ($profile) {
      $export['features']['ckeditor_profile'][$name] = $name;

      // Write dependencies on all the roles referenced by this profile
      foreach ((array) $profile->rids as $rid => $role_name) {
        $pipe['user_role'][] = $role_name;
      }
    }
  }
  $export['dependencies'][] = 'ckeditor';
  return $pipe;
}