You are here

function popup_onload_entity_property_info in Popup On Load 7

Implements hook_entity_property_info().

File

./popup_onload.module, line 502
Contains main popup_onload hooks and functions.

Code

function popup_onload_entity_property_info() {
  $info = [];

  // Add meta-data about the basic node properties.
  $properties =& $info['popup_onload']['properties'];
  $properties['popup_id'] = [
    'label' => t('Popup ID'),
    'type' => 'integer',
    'description' => t('Popup ID'),
    'schema field' => 'popup_id',
    'setter callback' => 'entity_property_verbatim_set',
  ];
  $properties['bundle_type'] = [
    'label' => t("Bundle type"),
    'type' => 'token',
    'description' => t("The type of the entity."),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => TRUE,
    'schema field' => 'bundle_type',
  ];
  $properties['language'] = [
    'label' => t("Language"),
    'type' => 'token',
    'description' => t("The language of the popup."),
    'setter callback' => 'entity_property_verbatim_set',
    'options list' => 'entity_metadata_language_list',
    'schema field' => 'language',
    'setter permission' => 'administer popup_onload entities',
  ];
  $properties['name'] = [
    'label' => t("name"),
    'description' => t("The name of the popup."),
    'setter callback' => 'entity_property_verbatim_set',
    'schema field' => 'name',
    'required' => TRUE,
  ];
  $properties['body'] = [
    'type' => 'text_formatted',
    'label' => t('The main body text'),
    'setter callback' => 'entity_property_verbatim_set',
    'property info' => entity_property_text_formatted_info(),
    'auto creation' => 'entity_property_create_array',
  ];
  $properties['format'] = [
    'label' => t("Format"),
    'description' => t("The format of the popup body."),
    'setter callback' => 'entity_property_verbatim_set',
    'schema field' => 'format',
    'required' => TRUE,
  ];
  $properties['width'] = [
    'label' => t("Width"),
    'description' => t("Popup width."),
    'type' => 'integer',
    'setter callback' => 'entity_property_verbatim_set',
    'schema field' => 'width',
  ];
  $properties['height'] = [
    'label' => t("Height"),
    'description' => t("Popup height."),
    'type' => 'integer',
    'setter callback' => 'entity_property_verbatim_set',
    'schema field' => 'height',
  ];
  $properties['fixed_position'] = [
    'label' => t("Fixed position"),
    'description' => t("Whether the popup position is fixed."),
    'type' => 'boolean',
    'setter callback' => 'entity_property_verbatim_set',
    'schema field' => 'fixed_position',
  ];
  $properties['active_popup'] = [
    'label' => t("Active"),
    'description' => t("Activate or deactivate a popup."),
    'type' => 'boolean',
    'setter callback' => 'entity_property_verbatim_set',
    'schema field' => 'active_popup',
  ];
  $properties['cookie_lifetime_single'] = [
    'label' => t("Cookie lifetime single"),
    'description' => t("Cookie lifetime for single popup."),
    'type' => 'boolean',
    'setter callback' => 'entity_property_verbatim_set',
    'schema field' => 'fixed_position',
  ];
  return $info;
}