コード例 #1
0
 protected function SetupClassGroup()
 {
     // Lookup Object PK information from Query String (if applicable)
     // Set mode to Edit or New depending on what's found
     $intId = QApplication::QueryString('intId');
     if ($intId) {
         $this->objClassGroup = ClassGroup::Load($intId);
         if (!$this->objClassGroup) {
             throw new Exception('Could not find a ClassGroup object with PK arguments: ' . $intId);
         }
         $this->strTitleVerb = QApplication::Translate('Edit');
         $this->blnEditMode = true;
     } else {
         $this->objClassGroup = new ClassGroup();
         $this->strTitleVerb = QApplication::Translate('Create');
         $this->blnEditMode = false;
     }
 }
コード例 #2
0
 public function btnEdit_Click($strFormId, $strControlId, $strParameter)
 {
     $strParameterArray = explode(',', $strParameter);
     $objClassGroup = ClassGroup::Load($strParameterArray[0]);
     $objEditPanel = new ClassGroupEditPanel($this, $this->strCloseEditPanelMethod, $objClassGroup);
     $strMethodName = $this->strSetEditPanelMethod;
     $this->objForm->{$strMethodName}($objEditPanel);
 }
コード例 #3
0
 /**
  * Override method to perform a property "Get"
  * This will get the value of $strName
  *
  * @param string $strName Name of the property to get
  * @return mixed
  */
 public function __get($strName)
 {
     switch ($strName) {
         ///////////////////
         // Member Variables
         ///////////////////
         case 'Id':
             /**
              * Gets the value for intId (Read-Only PK)
              * @return integer
              */
             return $this->intId;
         case 'ParentQcodoInterfaceId':
             /**
              * Gets the value for intParentQcodoInterfaceId 
              * @return integer
              */
             return $this->intParentQcodoInterfaceId;
         case 'ClassGroupId':
             /**
              * Gets the value for intClassGroupId 
              * @return integer
              */
             return $this->intClassGroupId;
         case 'Name':
             /**
              * Gets the value for strName (Unique)
              * @return string
              */
             return $this->strName;
         case 'FirstVersion':
             /**
              * Gets the value for strFirstVersion 
              * @return string
              */
             return $this->strFirstVersion;
         case 'LastVersion':
             /**
              * Gets the value for strLastVersion 
              * @return string
              */
             return $this->strLastVersion;
         case 'ShortDescription':
             /**
              * Gets the value for strShortDescription 
              * @return string
              */
             return $this->strShortDescription;
         case 'ExtendedDescription':
             /**
              * Gets the value for strExtendedDescription 
              * @return string
              */
             return $this->strExtendedDescription;
         case 'FileId':
             /**
              * Gets the value for intFileId 
              * @return integer
              */
             return $this->intFileId;
             ///////////////////
             // Member Objects
             ///////////////////
         ///////////////////
         // Member Objects
         ///////////////////
         case 'ParentQcodoInterface':
             /**
              * Gets the value for the QcodoInterface object referenced by intParentQcodoInterfaceId 
              * @return QcodoInterface
              */
             try {
                 if (!$this->objParentQcodoInterface && !is_null($this->intParentQcodoInterfaceId)) {
                     $this->objParentQcodoInterface = QcodoInterface::Load($this->intParentQcodoInterfaceId);
                 }
                 return $this->objParentQcodoInterface;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'ClassGroup':
             /**
              * Gets the value for the ClassGroup object referenced by intClassGroupId 
              * @return ClassGroup
              */
             try {
                 if (!$this->objClassGroup && !is_null($this->intClassGroupId)) {
                     $this->objClassGroup = ClassGroup::Load($this->intClassGroupId);
                 }
                 return $this->objClassGroup;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'File':
             /**
              * Gets the value for the File object referenced by intFileId 
              * @return File
              */
             try {
                 if (!$this->objFile && !is_null($this->intFileId)) {
                     $this->objFile = File::Load($this->intFileId);
                 }
                 return $this->objFile;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             ////////////////////////////
             // Virtual Object References (Many to Many and Reverse References)
             // (If restored via a "Many-to" expansion)
             ////////////////////////////
         ////////////////////////////
         // Virtual Object References (Many to Many and Reverse References)
         // (If restored via a "Many-to" expansion)
         ////////////////////////////
         case '_Operation':
             /**
              * Gets the value for the private _objOperation (Read-Only)
              * if set due to an expansion on the operation.qcodo_interface_id reverse relationship
              * @return Operation
              */
             return $this->_objOperation;
         case '_OperationArray':
             /**
              * Gets the value for the private _objOperationArray (Read-Only)
              * if set due to an ExpandAsArray on the operation.qcodo_interface_id reverse relationship
              * @return Operation[]
              */
             return (array) $this->_objOperationArray;
         case '_QcodoClassAsInterface':
             /**
              * Gets the value for the private _objQcodoClassAsInterface (Read-Only)
              * if set due to an expansion on the qcodo_class.interface_id reverse relationship
              * @return QcodoClass
              */
             return $this->_objQcodoClassAsInterface;
         case '_QcodoClassAsInterfaceArray':
             /**
              * Gets the value for the private _objQcodoClassAsInterfaceArray (Read-Only)
              * if set due to an ExpandAsArray on the qcodo_class.interface_id reverse relationship
              * @return QcodoClass[]
              */
             return (array) $this->_objQcodoClassAsInterfaceArray;
         case '_ChildQcodoInterface':
             /**
              * Gets the value for the private _objChildQcodoInterface (Read-Only)
              * if set due to an expansion on the qcodo_interface.parent_qcodo_interface_id reverse relationship
              * @return QcodoInterface
              */
             return $this->_objChildQcodoInterface;
         case '_ChildQcodoInterfaceArray':
             /**
              * Gets the value for the private _objChildQcodoInterfaceArray (Read-Only)
              * if set due to an ExpandAsArray on the qcodo_interface.parent_qcodo_interface_id reverse relationship
              * @return QcodoInterface[]
              */
             return (array) $this->_objChildQcodoInterfaceArray;
         default:
             try {
                 return parent::__get($strName);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
     }
 }