You are here

public function ConfigPagesController::create in Config Pages 7

Create a config_pages - we first set up the values that are specific to our config_pages schema but then also go through the EntityAPIController function.

Parameters

$type: The machine-readable type of the config_pages.

Return value

A config_pages object with all default fields initialized.

Overrides EntityAPIController::create

File

./config_pages.module, line 523
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.

Class

ConfigPagesController
The Controller for ConfigPages entities

Code

public function create(array $values = array()) {

  // Add values that are specific to our ConfigPages
  $values += array(
    'config_pages_id' => '',
    'is_new' => TRUE,
    'title' => '',
    'created' => '',
    'changed' => '',
    'data' => '',
  );
  $config_pages = parent::create($values);
  return $config_pages;
}