You are here

function config_pages_create in Config Pages 7

Create a config_pages object.

2 calls to config_pages_create()
config_pages_features_rebuild in ./config_pages.features.inc
Implements hook_features_rebuild().
config_pages_form_wrapper in ./config_pages.admin.inc
Form callback wrapper: create or edit a config_pages.
1 string reference to 'config_pages_create'
config_pages_entity_info in ./config_pages.module
Implement hook_entity_info().

File

./config_pages.module, line 421
This module is based on Model module (https://drupal.org/project/model) and most of the comments left untouched but have entity types renamed. Suuport for features added.

Code

function config_pages_create($values = array()) {
  $entity = entity_get_controller('config_pages')
    ->create($values);

  // Add context.
  $entity->context = config_pages_context_get($values['type']);
  return $entity;
}