Please note that not every control will utilize every single one of these properties. Keep in mind that Controls that are not Enabled or not Visible will not go through the form's Validation routine. All Controls must implement the following abstract functions:
  • {@link QControlBase::GetControlHtml()}
  • {@link QControlBase::ParsePostData()}
  • {@link QControlBase::Validate()}
Inheritance: extends QBaseClass
コード例 #1
0
ファイル: Control.php プロジェクト: alfhan/plugin_bootstrap
 /**
  * Note that the constructor cannot be put into the trait, because it will cause a conflict.
  * @param \QControl|\QControlBase|\QForm $objParent
  * @param null $strControlId
  */
 public function __construct($objParent, $strControlId = null)
 {
     parent::__construct($objParent, $strControlId);
     Bootstrap::LoadJS($this);
     /*
     
     if ($this instanceof \QTextBoxBase ||
     	$this instanceof \QListBox) {
     	$this->AddCssClass (Bootstrap::FormControl);
     }
     */
 }
コード例 #2
0
 /**
  * Renders the AjaxHelper for the QForm
  * @param QControlBase $objControl
  *
  * @return string The Ajax helper string (should be JS commands)
  */
 protected function RenderAjaxHelper($objControl)
 {
     $controls = [];
     if ($objControl) {
         $controls = array_merge($controls, $objControl->RenderAjax());
         // will return an array of controls to be merged with current controls
         foreach ($objControl->GetChildControls() as $objChildControl) {
             $controls = array_merge($controls, $this->RenderAjaxHelper($objChildControl));
         }
     }
     return $controls;
 }
コード例 #3
0
ファイル: QControl.class.php プロジェクト: brustj/tracmor
 public function __set($strName, $mixValue)
 {
     switch ($strName) {
         case 'DisplayName':
             return $this->blnDisplayName = QType::Cast($mixValue, QType::Boolean);
         default:
             try {
                 return parent::__set($strName, $mixValue);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
     }
 }
コード例 #4
0
 /**
  * Renders the AjaxHelper for the QForm
  * @param QControlBase $objControl
  *
  * @return string The Ajax helper string (should be JS commands)
  */
 protected function RenderAjaxHelper($objControl)
 {
     // $strToReturn = '';
     if ($objControl) {
         $strToReturn = $objControl->RenderAjax(false);
     }
     if ($strToReturn) {
         $strToReturn .= "\r\n";
     }
     foreach ($objControl->GetChildControls() as $objChildControl) {
         $strToReturn .= $this->RenderAjaxHelper($objChildControl);
     }
     return $strToReturn;
 }
コード例 #5
0
 /**
  * Sets the parent control for this control
  * @param QControl|QControlBase $objControl The control which has to be set as this control's parent
  */
 public function SetParentControl($objControl)
 {
     // Mark this object as modified
     $this->MarkAsModified();
     // Mark the old parent (if applicable) as modified
     if ($this->objParentControl) {
         $this->objParentControl->RemoveChildControl($this->ControlId, false);
     }
     // Mark the new parent (if applicable) as modified
     if ($objControl) {
         $objControl->AddChildControl($this);
     }
 }
コード例 #6
0
 private function setJavaScripts(QControlBase $objControl)
 {
     $objControl->AddJavascriptFile(__JQUERY_EFFECTS__);
 }