protected function SetupPanel() { if (!$this->objGroup->IsLoginCanView(QApplication::$Login)) { $this->ReturnTo('/groups/'); } // Setup Group Array $this->objGroupArray = $this->objGroup->GetThisAndChildren(); $this->intGroupIdArray = array(); foreach ($this->objGroupArray as $objGroup) { $this->intGroupIdArray[] = $objGroup->Id; } $this->SetupViewControls(false, false); $this->dtgMembers->SetDataBinder('dtgMembers_Bind', $this); $this->dtgGroups = new QDataGrid($this); $this->dtgGroups->AddColumn(new QDataGridColumn('Group Name', '<?= $_CONTROL->ParentControl->RenderGroupName($_ITEM); ?>', 'HtmlEntities=false', 'Width=250px')); $this->dtgGroups->AddColumn(new QDataGridColumn('Type', '<?= $_ITEM->Type; ?>', 'Width=130px')); $this->dtgGroups->AddColumn(new QDataGridColumn('Email', '<?= $_ITEM->EmailTypeHtml ; ?>', 'HtmlEntities=false', 'Width=360px')); $this->dtgGroups->SetDataBinder('dtgGroups_Bind', $this); if ($this->objGroup->CountEmailMessageRoutes()) { $this->SetupEmailMessageControls(); } $this->SetupSmsControls(); }
public function __set($strName, $mixValue) { switch ($strName) { case 'Title': try { $this->strLabelForNoneFound = ' ' . sprintf('<b>%s</b>: %s', $mixValue, QApplication::Translate('%s found nothing.')); /**Translators: ignore %s */ $this->strLabelForOneFound = ' ' . sprintf('<b>%s</b>: %s', $mixValue, QApplication::Translate(' 1 %s found.')); /**Translators: ignore %s */ $this->strLabelForMultipleFound = ' ' . sprintf('<b>%s</b>: %s', $mixValue, QApplication::Translate(' %d %s found.')); /**Translators: ignore %s */ $this->strLabelForPaginated = ' ' . sprintf('<b>%s</b>: %s', $mixValue, QApplication::Translate('%s %d-%d of %d.')); /**Translators: ignore %s */ $this->strNoun = ''; $this->strNounPlural = ''; break; } catch (QInvalidCastException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'AlwaysShowPaginator': try { $this->blnAlwaysShowPaginator = QType::Cast($mixValue, QType::Boolean); break; } catch (QInvalidCastException $objExc) { $objExc->IncrementOffset(); throw $objExc; } default: try { parent::__set($strName, $mixValue); break; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } } }
/** * Standard DataGrid constructor which also pre-configures the DataBinder * to its own BindAllRows method (which can obviousy be switched to something else). * * Also pre-configures UseAjax to true. * * @param mixed $objParentObject either a QPanel or QForm which would be this DataGrid's parent * @param string $strControlId optional explicitly-defined ControlId for this DataGrid */ public function __construct($objParentObject, $strControlId = null) { parent::__construct($objParentObject, $strControlId); $this->SetDataBinder('BindAllRows', $this); $this->UseAjax = true; }
/** * This will set the property $strName to be $mixValue * * @param string $strName Name of the property to set * @param string $mixValue New value of the property * @return mixed */ public function __set($strName, $mixValue) { switch ($strName) { case 'AdditionalConditions': try { return $this->conAdditionalConditions = QType::Cast($mixValue, 'QQCondition'); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'AdditionalClauses': try { return $this->clsAdditionalClauses = QType::Cast($mixValue, QType::ArrayType); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } default: try { parent::__set($strName, $mixValue); break; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } } }
protected function refreshGrid() { $this->dtg->Refresh(); }