/**
  * QFileAsset::__construct()
  *
  * @param mixed  $objParentObject
  * @param string $strControlId
  *
  * @return \QFileAsset
  */
 public function __construct($objParentObject, $strControlId = null)
 {
     parent::__construct($objParentObject, $strControlId);
     // Setup Default Properties
     $this->strTemplate = __DOCROOT__ . __PHP_ASSETS__ . '/QFileAsset.tpl.php';
     $this->dlgFileAsset->Width = '300';
     $this->UploadText = QApplication::Translate('Upload');
     $this->CancelText = QApplication::Translate('Cancel');
     $this->btnUpload->Text = '<img src="' . __VIRTUAL_DIRECTORY__ . __IMAGE_ASSETS__ . '/add.png" alt="' . QApplication::Translate('Upload') . '" border="0"/> ' . QApplication::Translate('Upload');
     $this->btnDelete->Text = '<img src="' . __VIRTUAL_DIRECTORY__ . __IMAGE_ASSETS__ . '/delete.png" alt="' . QApplication::Translate('Delete') . '" border="0"/> ' . QApplication::Translate('Delete');
     $this->DialogBoxHtml = '<p>' . QApplication::Translate('Please select a file to upload.') . '</p>';
 }
Beispiel #2
0
 public function __construct($objParentObject, $strControlId = null)
 {
     parent::__construct($objParentObject, $strControlId);
     // Setup Default Properties
     $this->strTemplate = __QCODO_CORE__ . '/assets/QFileAsset.tpl.php';
     $this->DialogBoxCssClass = 'fileassetDbox';
     $this->UploadText = QApplication::Translate('Upload');
     $this->CancelText = QApplication::Translate('Cancel');
     $this->btnUpload->Text = '<img src="' . __VIRTUAL_DIRECTORY__ . __IMAGE_ASSETS__ . '/add.png" alt="' . QApplication::Translate('Upload') . '" border="0"/> ' . QApplication::Translate('Upload');
     $this->btnDelete->Text = '<img src="' . __VIRTUAL_DIRECTORY__ . __IMAGE_ASSETS__ . '/delete.png" alt="' . QApplication::Translate('Delete') . '" border="0"/> ' . QApplication::Translate('Delete');
     $this->DialogBoxHtml = '<h1>Upload a File</h1><p>Please select a file to upload.</p>';
 }
Beispiel #3
0
 public function __set($strName, $mixValue)
 {
     $this->blnModified = true;
     switch ($strName) {
         case 'EntityQtypeId':
             try {
                 return $this->intEntityQtypeId = $mixValue;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'EntityId':
             try {
                 return $this->intEntityId = $mixValue;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         default:
             try {
                 return parent::__set($strName, $mixValue);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
     }
 }
Beispiel #4
0
 public function __set($strName, $mixValue)
 {
     $this->blnModified = true;
     switch ($strName) {
         case 'MaxFileSize':
             try {
                 return $this->intMaxFileSize = QType::Cast($mixValue, QType::Integer);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'UnacceptableFileSizeMessage':
             try {
                 return $this->strUnacceptableFileSizeMessage = QType::Cast($mixValue, QType::String);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         default:
             try {
                 return parent::__set($strName, $mixValue);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
     }
 }