Project

General

Profile

Download (990 Bytes) Statistics
| Branch: | Tag: | Revision:
1
<?php
2
/**
3
 * @file
4
 * Class to provide a footnote.
5
 *
6
 * @copyright
7
 *   (C) 2007-2012 EDIT
8
 *   European Distributed Institute of Taxonomy
9
 *   http://www.e-taxonomy.eu
10
 *
11
 *   The contents of this module are subject to the Mozilla
12
 *   Public License Version 1.1.
13
 * @see http://www.mozilla.org/MPL/MPL-1.1.html
14
 */
15

    
16
/**
17
 * Provides a footnote.
18
 */
19
class Footnote {
20
  public $key, $object, $enclosing_tag;
21

    
22
  /**
23
   * Private constructor.
24
   */
25
  public function __construct($footnoteKey, $object, $enclosing_tag = NULL) {
26
    $this->key = $footnoteKey;
27
    $this->object = $object;
28
    $this->enclosing_tag = $enclosing_tag;
29
  }
30

    
31
  /**
32
   * @todo please document this function.
33
   */
34
  public function doRender() {
35
    $variables = array(
36
      'footnoteKey' => $this->key,
37
      'footnoteText' => $this->object
38
    );
39
    if(is_string($this->enclosing_tag)){
40
      $variables['enclosing_tag'] = $this->enclosing_tag;
41
    }
42
    return theme('cdm_footnote',
43
      $variables
44
    );
45
  }
46
}
(1-1/4)