You are here

function ckeditor_profile_features_export in CKEditor - WYSIWYG HTML editor 7

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

Implementation of hook_features_export()

File

includes/ckeditor.features.inc, line 52
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->input_formats as $input_format => $input_format_name) {
        $pipe['input_formats'][] = $input_format;
      }
    }
  }
  $export['dependencies']['ckeditor'] = 'ckeditor';
  return $pipe;
}