You are here

flexiform_handler_field_add_page_url.inc in Flexiform 7

Contains a Views field handler to take care of displaying the path to the add page display.

File

includes/views/handlers/flexiform_handler_field_add_page_url.inc
View source
<?php

/**
 * @file
 * Contains a Views field handler to take care of displaying the path to the
 * add page display.
 */
class flexiform_handler_field_add_page_url extends views_handler_field {
  function construct() {
    parent::construct();
    $this->additional_fields['id'] = 'id';
  }
  function query() {
    $this
      ->ensure_my_table();
    $this
      ->add_additional_fields();
  }
  function render($values) {
    $id = $values->{$this->aliases['id']};
    $flexiform = entity_load_single('flexiform', $id);
    if (empty($flexiform->displays['FlexiformDisplayCreatePage']['enabled'])) {
      return '';
    }
    $path = $flexiform->displays['FlexiformDisplayCreatePage']['path'];
    return $path;
  }

}

Classes

Namesort descending Description
flexiform_handler_field_add_page_url @file Contains a Views field handler to take care of displaying the path to the add page display.