You are here

function organigrams_entity_property_info in Organigrams 7

Implements hook_entity_property_info().

File

./organigrams.module, line 83
Defines the organigrams functions and entity types.

Code

function organigrams_entity_property_info() {
  $info = array();

  // Add meta-data about the basic organigrams item properties.
  $properties =& $info['organigrams_item']['properties'];

  // Organigrams item related properties.
  $properties['iid'] = array(
    'label' => t('Organigram item ID'),
    'description' => t('The unique ID of the organigram item.'),
    'type' => 'integer',
    'schema field' => 'iid',
  );
  $properties['name'] = array(
    'label' => t('Name'),
    'description' => t('The name of the organigram item.'),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => TRUE,
    'schema field' => 'name',
  );
  $properties['parent'] = array(
    'label' => t('Parent item'),
    'description' => t('The parent terms of the taxonomy term.'),
    'setter callback' => 'organigrams_metadata_organigrams_item_setter',
    'type' => 'organigrams_item',
    'schema field' => 'parent',
  );
  $properties['position'] = array(
    'label' => t('Position'),
    'description' => t('The position of the organigram item.'),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => TRUE,
    'schema field' => 'position',
  );
  $properties['url'] = array(
    'label' => t('URL'),
    'description' => t('Add a link to this URL to the organigram item.'),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => FALSE,
    'schema field' => 'url',
  );
  $properties['border_color'] = array(
    'label' => t('Border color'),
    'description' => t('The border color of the organigram item.'),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => FALSE,
    'schema field' => 'border_color',
  );
  $properties['border_color_hover'] = array(
    'label' => t('Border color hover'),
    'description' => t('The border color of the organigram item when hovering over it if it has a URL.'),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => FALSE,
    'schema field' => 'border_color_hover',
  );
  $properties['background_color'] = array(
    'label' => t('Background color'),
    'description' => t('The background color of the organigram item.'),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => FALSE,
    'schema field' => 'background_color',
  );
  $properties['background_color_hover'] = array(
    'label' => t('Background color hover'),
    'description' => t('The background color of the organigram item when hovering over it if it has a URL.'),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => FALSE,
    'schema field' => 'background_color_hover',
  );
  $properties['font_color'] = array(
    'label' => t('Font color'),
    'description' => t('The font color of the organigram item.'),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => FALSE,
    'schema field' => 'font_color',
  );
  $properties['font_color_hover'] = array(
    'label' => t('Font color hover'),
    'description' => t('The font color of the organigram item when hovering over it if it has a URL.'),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => FALSE,
    'schema field' => 'font_color_hover',
  );
  $properties['bold_border'] = array(
    'label' => t('Bold border'),
    'description' => t('Emphasize the organigram item with an extra border.'),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => FALSE,
    'schema field' => 'bold_border',
  );
  $properties['image_url'] = array(
    'label' => t('Image URL'),
    'description' => t('The image URL of an image to add to the organigram item.'),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => FALSE,
    'schema field' => 'image_url',
  );
  $properties['image_alignment'] = array(
    'label' => t('Image alignment'),
    'description' => t('The alignment of the image in the organigram item.'),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => FALSE,
    'schema field' => 'image_alignment',
  );
  $properties['weight'] = array(
    'label' => t('Weight'),
    'description' => t('The weight of the organigram item, which is used for ordering items during display.'),
    'setter callback' => 'entity_property_verbatim_set',
    'schema field' => 'weight',
  );
  $properties['organigram'] = array(
    'label' => t('organigram'),
    'description' => t('The organigram the organigram item belongs to.'),
    'setter callback' => 'organigrams_metadata_organigrams_item_setter',
    'type' => 'organigrams',
    'required' => TRUE,
    'schema field' => 'oid',
  );

  // Add meta-data about the basic organigrams properties.
  $properties =& $info['organigrams']['properties'];

  // Organigrams related variables.
  $properties['oid'] = array(
    'label' => t('Organigram ID'),
    'description' => t('The unique ID of the organigram.'),
    'type' => 'integer',
    'schema field' => 'oid',
  );
  $properties['name'] = array(
    'label' => t('Name'),
    'description' => t('The name of the organigram.'),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => TRUE,
    'schema field' => 'name',
  );
  $properties['machine_name'] = array(
    'label' => t('Machine name'),
    'description' => t('The machine name of the organigram.'),
    'setter callback' => 'entity_property_verbatim_set',
    'type' => 'token',
    'required' => TRUE,
    'schema field' => 'machine_name',
  );
  $properties['description'] = array(
    'label' => t('Description'),
    'description' => t('The optional description of the organigram.'),
    'setter callback' => 'entity_property_verbatim_set',
    'sanitize' => 'filter_xss',
    'schema field' => 'description',
  );
  $properties['status'] = array(
    'label' => t('status'),
    'description' => t('The published status of the organigram.'),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => FALSE,
    'schema field' => 'status',
  );
  $properties['canvas_width'] = array(
    'label' => t('Canvas width'),
    'description' => t('Specify the width in pixels of the organigram.'),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => FALSE,
    'schema field' => 'canvas_width',
  );
  $properties['canvas_height'] = array(
    'label' => t('Canvas height'),
    'description' => t('Specify the height in pixels of the organigram.'),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => FALSE,
    'schema field' => 'canvas_height',
  );
  $properties['center'] = array(
    'label' => t('Center'),
    'description' => t('Boolean indicating whether the organigram should align on the center of the page.'),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => FALSE,
    'schema field' => 'center',
  );
  $properties['fit'] = array(
    'label' => t('Fit in given width'),
    'description' => t('Boolean indicating whether the organigram should rescale to the given width.'),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => FALSE,
    'schema field' => 'fit',
  );
  $properties['node_width'] = array(
    'label' => t('Node width'),
    'description' => t('Specify the width in pixels of the items in this organigram.'),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => FALSE,
    'schema field' => 'node_width',
  );
  $properties['node_height'] = array(
    'label' => t('Node height'),
    'description' => t('Specify the height in pixels of the items in this organigram.'),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => FALSE,
    'schema field' => 'node_height',
  );
  $properties['top_radius'] = array(
    'label' => t('Top radius'),
    'description' => t('Specify the radius of the top corners in pixels of the items in this organigram.'),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => FALSE,
    'schema field' => 'top_radius',
  );
  $properties['bottom_radius'] = array(
    'label' => t('Bottom radius'),
    'description' => t('Specify the radius of the bottom corners in pixels of the items in this organigram.'),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => FALSE,
    'schema field' => 'bottom_radius',
  );
  $properties['shadow_offset'] = array(
    'label' => t('Shadow offset'),
    'description' => t('Specify the shadow offset in pixels of the items in this organigram.'),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => FALSE,
    'schema field' => 'shadow_offset',
  );
  $properties['horizontal_space'] = array(
    'label' => t('Horizontal space'),
    'description' => t('Specify the horizontal space in pixels between the items in this organigram.'),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => FALSE,
    'schema field' => 'horizontal_space',
  );
  $properties['vertical_space'] = array(
    'label' => t('Vertical space'),
    'description' => t('Specify the vertical space in pixels between the items in this organigram.'),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => FALSE,
    'schema field' => 'vertical_space',
  );
  $properties['horizontal_offset'] = array(
    'label' => t('Horizontal offset'),
    'description' => t('Specify the horizontal offset in pixels between the l and r items in this organigram.'),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => FALSE,
    'schema field' => 'horizontal_offset',
  );
  $properties['line_color'] = array(
    'label' => t('Line color'),
    'description' => t('Specify the connection lines color in this organigram.'),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => FALSE,
    'schema field' => 'line_color',
  );
  $properties['border_color'] = array(
    'label' => t('Border color'),
    'description' => t('Specify the border color of the items in this organigram.'),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => FALSE,
    'schema field' => 'border_color',
  );
  $properties['border_color_hover'] = array(
    'label' => t('Border color hover'),
    'description' => t('Specify the border color of the items with URL in this organigram when hovering over them.'),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => FALSE,
    'schema field' => 'border_color_hover',
  );
  $properties['background_color'] = array(
    'label' => t('Background color'),
    'description' => t('Specify the background color of the items in this organigram.'),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => FALSE,
    'schema field' => 'background_color',
  );
  $properties['background_color_hover'] = array(
    'label' => t('Background color hover'),
    'description' => t('Specify the background color of the items with URL in this organigram when hovering over them.'),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => FALSE,
    'schema field' => 'background_color_hover',
  );
  $properties['font_color'] = array(
    'label' => t('Font color'),
    'description' => t('Specify the font color of the items in this organigram.'),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => FALSE,
    'schema field' => 'font_color',
  );
  $properties['font_color_hover'] = array(
    'label' => t('Font color hover'),
    'description' => t('Specify the font color of the items with in this organigram when hovering over them.'),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => FALSE,
    'schema field' => 'font_color_hover',
  );
  $properties['font_name'] = array(
    'label' => t('Font name'),
    'description' => t('Specify the font name of the items in this organigram.'),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => FALSE,
    'schema field' => 'font_name',
  );
  $properties['font_size'] = array(
    'label' => t('Font size'),
    'description' => t('Specify the font size in pixels of the items in this organigram.'),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => FALSE,
    'schema field' => 'font_size',
  );
  $properties['line_height'] = array(
    'label' => t('Line height'),
    'description' => t('Specify the line height in pixels for the text in the items in this organigram.'),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => FALSE,
    'schema field' => 'line_height',
  );
  $properties['vertical_alignment'] = array(
    'label' => t('Vertical text alignment'),
    'description' => t('Specify the vertical text alignment of the items in this organigram.'),
    'setter callback' => 'entity_property_verbatim_set',
    'required' => FALSE,
    'schema field' => 'vertical_alignment',
  );
  return $info;
}