public function AccessSchemeEntityController::create in Access Control Kit 7
Constructs a new scheme object without saving it.
Parameters
array $values: (optional) An array of values to set, keyed by property name.
Return value
object An access scheme object.
File
- ./
access_scheme_entity_controller.inc, line 22 - Contains the access scheme entity controller.
Class
- AccessSchemeEntityController
- Provides the entity controller for access schemes.
Code
public function create(array $values = array()) {
$scheme = new stdClass();
$scheme->sid = NULL;
$scheme->machine_name = empty($values['machine_name']) ? '' : $values['machine_name'];
$scheme->name = empty($values['name']) ? '' : $values['name'];
$scheme->type = empty($values['type']) ? '' : $values['type'];
$scheme->description = empty($values['description']) ? '' : $values['description'];
$scheme->settings = array();
return $scheme;
}