• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List

E:/E/GEAMP/www/openbiz/openbiz/bin/easy/element/RawData.php

00001 <?PHP
00017 include_once("Element.php");
00018 
00027 class RawData extends Element
00028 {             
00029 
00030     public $m_UnSerialize;
00031 
00038     protected function readMetaData(&$xmlArr)
00039     {
00040         parent::readMetaData($xmlArr);
00041         $this->m_FieldName = isset($xmlArr["ATTRIBUTES"]["FIELDNAME"]) ? $xmlArr["ATTRIBUTES"]["FIELDNAME"] : null;
00042         $this->m_Label = isset($xmlArr["ATTRIBUTES"]["LABEL"]) ? $xmlArr["ATTRIBUTES"]["LABEL"] : null;
00043         $this->m_Text = isset($xmlArr["ATTRIBUTES"]["TEXT"]) ? $xmlArr["ATTRIBUTES"]["TEXT"] : null;
00044         $this->m_Link = isset($xmlArr["ATTRIBUTES"]["LINK"]) ? $xmlArr["ATTRIBUTES"]["LINK"] : null;
00045         $this->m_UnSerialize = isset($xmlArr["ATTRIBUTES"]["UNSERIALIZE"]) ? $xmlArr["ATTRIBUTES"]["UNSERIALIZE"] : null;
00046     }
00047 
00053     protected function getLink()
00054     {
00055         if ($this->m_Link == null)
00056             return null;
00057         $formobj = $this->getFormObj();
00058         return Expression::evaluateExpression($this->m_Link, $formobj);
00059     }
00060 
00066     public function renderLabel()
00067     {
00068         return $this->m_Label;
00069     }
00070 
00076     protected function getText()
00077     {
00078         if ($this->m_Text == null)
00079             return null;
00080         $formObj = $this->getFormObj();
00081         return Expression::evaluateExpression($this->m_Text, $formObj);
00082     }
00083     
00089     public function render()
00090     {       
00091        $value = $this->m_Text ? $this->getText() : $this->m_Value;    
00092         if ($value === null || $value == "")
00093             return $value;
00094 
00095         if($this->m_UnSerialize=="Y")
00096         {
00097             $value = unserialize($value);
00098         }
00099 
00100         if($this->m_Translatable=='Y')
00101         {
00102             if(is_array($value))
00103             {
00104                 foreach($value as $key => $value)
00105                 {
00106                     $value[$key] = $value = $this->translateString($value);
00107                 }
00108             }
00109             else
00110             {
00111                 $value = $this->translateString($value);
00112             }
00113         }
00114         return $value;
00115     }
00116 }
00117 
00118 ?>

Generated on Thu Apr 19 2012 17:09:13 for openbiz by  doxygen 1.7.2