Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
report.inc
1 <?php
17 require_once SQ_CORE_PACKAGE_PATH.'/page/page.inc';
18 
30 class Report extends Page
31 {
32 
33 
40  function __construct($assetid=0)
41  {
42  parent::__construct($assetid);
43 
44  }//end constructor
45 
46 
57  protected function _getName($short_name=FALSE, $contextid=NULL)
58  {
59  // No context specified, using the current context
60  if ($contextid === NULL) {
61  $contextid = $GLOBALS['SQ_SYSTEM']->getContextId();
62  }//end if
63 
64  // Obtain the attribute value for Name from the specified Context
65  $values = $GLOBALS['SQ_SYSTEM']->am->getAttributeValuesByName('name', $this->type(), Array($this->id), $contextid);
66  if (empty($values) === TRUE) {
67  return parent::_getName($short_name, $contextid);
68  } else {
69  return $values[$this->id];
70  }
71 
72  }//end _getName()
73 
74 
81  public function lockTypes()
82  {
83  $lock_types = parent::lockTypes();
84  $lock_types['content'] = ($lock_types['attributes'] | $lock_types['links']);
85  return $lock_types;
86 
87  }//end lockTypes()
88 
89 
97  public function _getAllowedLinks()
98  {
99  $page_links = parent::_getAllowedLinks();
100  $page_links[SQ_LINK_NOTICE]['asset'] = Array('card' => 'M', 'exclusive' => FALSE);
101  return $page_links;
102 
103  }//end _getAllowedLinks()
104 
105 
114  public function printBody()
115  {
116  ?>
117  <script type="text/javascript" src="<?php echo sq_web_path('lib');?>/js/general.js"></script>
118  <link rel="stylesheet" type="text/css" href="<?php echo sq_web_path('lib');?>/web/css/edit.css" />
119  <?php
120  require_once SQ_INCLUDE_PATH.'/limbo_outputter.inc';
121  $o = new Limbo_Outputter();
122  $o->openSection();
123  $efns = $this->getEditFns();
124  $efns->paintReport($this, $o, $this->getPrefix());
125  $o->closeSection();
126  $o->paintSections();
127 
128  }//end printBody()
129 
130 
131 }//end class
132 
133 ?>