Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
data_source_record_set_edit_fns.inc
1 <?php
18 require_once SQ_INCLUDE_PATH.'/asset_edit/asset_edit_fns.inc';
19 
20 
33 {
34 
35 
40  function __construct()
41  {
42  parent::__construct();
43 
44  unset($this->static_screens['workflow']);
45  unset($this->static_screens['metadataSchemas']);
46  unset($this->static_screens['permissions']);
47  unset($this->static_screens['roles']);
48  unset($this->static_screens['logs']);
49  unset($this->static_screens['dependants']);
50  unset($this->static_screens['metadata']);
51  unset($this->static_screens['settings']);
52  unset($this->static_screens['tagging']);
53  unset($this->static_screens['layouts']);
54  unset($this->static_screens['preview']);
55  unset($this->static_screens['history']);
56 
57  }//end constructor
58 
59 
70  public function paintDetails(Data_Source_Record_Set $asset, Backend_Outputter $o, $prefix)
71  {
72  $vars = $asset->vars;
73 
74  // See if the datasource has any attributes defined as the "binary data"
75  $asset_bits = explode(':', $asset->id);
76  $parent = $GLOBALS['SQ_SYSTEM']->am->getAsset($asset_bits[0]);
77  $binary_attrs = $parent->getBinaryDataAttributes();
78  foreach($binary_attrs as $index => $attr) {
79  $binary_attrs[$index] = strtolower($attr);
80  }
81 
82  ?>
83  <b>Record Set Is: </b>
84  <table>
85  <?php
86  foreach ($vars as $key => $value) {
87  ?>
88  <tr>
89  <?php
90  if ($key != 'shadow_asset_name') {
91  ?><td><b><?php echo $key;?></b></td>
92  <td><?php
93  // If the value is defined as "binary", do not paint it
94  if (!empty($binary_attrs) && in_array($key, $binary_attrs)) {
95  echo '{Binary data}';
96  } else {
97  echo $value;
98  }
99  ?></td>
100  <?php
101  }
102  ?>
103  </tr>
104  <?php
105  }
106  ?>
107  </table>
108  <?php
109 
110  return FALSE;
111 
112  }//end paintDetails()
113 
114 
125  public function processDetails(Data_Source_Record_Set $asset, Backend_Outputter $o, $prefix)
126  {
127  return FALSE;
128 
129  }//end processDetails()
130 
131 
132 }//end class
133 
134 ?>