コード例 #1
0
 /**
  * Append object properties
  * @param ilObject $obj
  */
 public function __appendObjectProperties(ilObject $obj)
 {
     switch ($obj->getType()) {
         case 'file':
             include_once './Modules/File/classes/class.ilObjFileAccess.php';
             $size = ilObjFileAccess::_lookupFileSize($obj->getId());
             $extension = ilObjFileAccess::_lookupSuffix($obj->getId());
             $this->xmlStartTag('Properties');
             $this->xmlElement("Property", array('name' => 'fileSize'), (int) $size);
             $this->xmlElement("Property", array('name' => 'fileExtension'), (string) $extension);
             // begin-patch fm
             $this->xmlElement('Property', array('name' => 'fileVersion'), (string) ilObjFileAccess::_lookupVersion($obj->getId()));
             // end-patch fm
             $this->xmlEndTag('Properties');
             break;
     }
 }