You are here

function ad_create in Advertisement 7.2

Returns an initialized ad object.

Parameters

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

Return value

An ad object with all default fields initialized.

1 call to ad_create()
_ad_create in ./ad.module
Creation callback for the Entity Metadata module.

File

./ad.module, line 269
Defines the core ad entity, including the entity itself, the bundle definitions (ad types), and various API functions to manage ads and interact with them through forms and autocompletes.

Code

function ad_create($type) {
  return entity_get_controller('ad')
    ->create($type);
}