You are here

function ad_get_properties in Advertisement 7.2

Callback for getting ad properties.

See also

ad_entity_property_info()

File

./ad.module, line 400
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_get_properties($ad, array $options, $name) {
  switch ($name) {
    case 'creator':
      return $ad->uid;
    case 'edit-url':
      return url('admin/ad/types/' . $ad->aid . '/edit', $options);
  }
}