public function __get($strName) { switch ($strName) { // APPEARANCE case "Template": return $this->strTemplate; case "CurrentItemIndex": return $this->intCurrentItemIndex; case "TagName": return $this->strTagName; default: try { return parent::__get($strName); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } } }
/** * PHP magic method * * @param string $strName * * @return bool|int|mixed|null * @throws Exception * @throws QCallerException */ public function __get($strName) { switch ($strName) { case 'RowCssClass': return $this->strRowCssClass; case 'AlternateRowCssClass': return $this->strAlternateRowCssClass; case 'HeaderRowCssClass': return $this->strHeaderRowCssClass; case 'ShowHeader': return $this->blnShowHeader; case 'ShowFooter': return $this->blnShowFooter; case 'RenderColumnTags': return $this->blnRenderColumnTags; case 'Caption': return $this->strCaption; case 'HeaderRowCount': return $this->intHeaderRowCount; case 'CurrentHeaderRowIndex': return $this->intCurrentHeaderRowIndex; case 'HideIfEmpty': return $this->blnHideIfEmpty; case 'CurrentRowIndex': return $this->intCurrentRowIndex; default: try { return parent::__get($strName); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } } }
public function __get($strName) { switch ($strName) { // APPEARANCE case "AlternateRowStyle": return $this->objAlternateRowStyle; case "BorderCollapse": return $this->strBorderCollapse; case "HeaderRowStyle": return $this->objHeaderRowStyle; case "HeaderLinkStyle": return $this->objHeaderLinkStyle; case "RowStyle": return $this->objRowStyle; // LAYOUT // LAYOUT case "CellPadding": return $this->intCellPadding; case "CellSpacing": return $this->intCellSpacing; case "GridLines": return $this->strGridLines; case "ShowHeader": return $this->blnShowHeader; case "ShowFooter": return $this->blnShowFooter; // MISC // MISC case "OrderByClause": if ($this->intSortColumnIndex >= 0) { if ($this->intSortDirection == 0) { return $this->objColumnArray[$this->intSortColumnIndex]->OrderByClause; } else { return $this->objColumnArray[$this->intSortColumnIndex]->ReverseOrderByClause; } } else { return null; } case "SortInfo": if ($this->intSortColumnIndex >= 0) { if ($this->intSortDirection == 0) { $mixToReturn = $this->objColumnArray[$this->intSortColumnIndex]->SortByCommand; if ($mixToReturn instanceof QQOrderBy) { return $mixToReturn->GetAsManualSql(); } else { return $mixToReturn; } } else { $mixToReturn = $this->objColumnArray[$this->intSortColumnIndex]->ReverseSortByCommand; if ($mixToReturn instanceof QQOrderBy) { return $mixToReturn->GetAsManualSql(); } else { return $mixToReturn; } } } else { return null; } case "CurrentRowIndex": return $this->intCurrentRowIndex; case "SortColumnIndex": return $this->intSortColumnIndex; case "SortDirection": return $this->intSortDirection; case 'LabelForNoneFound': return $this->strLabelForNoneFound; case 'LabelForOneFound': return $this->strLabelForOneFound; case 'LabelForMultipleFound': return $this->strLabelForMultipleFound; case 'LabelForPaginated': return $this->strLabelForPaginated; default: try { return parent::__get($strName); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } } }
public function __get($strName) { switch ($strName) { case 'RowCssClass': return $this->strRowCssClass; case 'AlternateRowCssClass': return $this->strAlternateRowCssClass; case 'HeaderRowCssClass': return $this->strHeaderRowCssClass; case 'ShowHeader': return $this->blnShowHeader; case 'ShowFooter': return $this->blnShowFooter; default: try { return parent::__get($strName); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } } }
public function __get($strName) { switch ($strName) { // APPEARANCE case "AlternateRowStyle": return $this->objAlternateRowStyle; case "BorderCollapse": return $this->strBorderCollapse; case "HeaderRowStyle": return $this->objHeaderRowStyle; case "FilterRowStyle": return $this->objFilterRowStyle; case "HeaderLinkStyle": return $this->objHeaderLinkStyle; case "RowStyle": return $this->objRowStyle; // LAYOUT // LAYOUT case "CellPadding": return $this->intCellPadding; case "CellSpacing": return $this->intCellSpacing; case "GridLines": return $this->strGridLines; case "ShowHeader": return $this->blnShowHeader; case "ShowFooter": return $this->blnShowFooter; case "ShowFilter": return $this->blnShowFilter; case "ShowFilterButton": return $this->blnShowFilterButton; case 'ShowFilterResetButton': return $this->blnShowFilterResetButton; // MISC // MISC case "OrderByClause": if ($this->intSortColumnIndex >= 0) { if ($this->intSortDirection == 0) { return $this->objColumnArray[$this->intSortColumnIndex]->OrderByClause; } else { return $this->objColumnArray[$this->intSortColumnIndex]->ReverseOrderByClause; } } else { return null; } case "SortInfo": if ($this->intSortColumnIndex >= 0) { if ($this->intSortDirection == 0) { $mixToReturn = $this->objColumnArray[$this->intSortColumnIndex]->SortByCommand; if ($mixToReturn instanceof QQOrderBy) { return $mixToReturn->GetAsManualSql(); } else { return $mixToReturn; } } else { $mixToReturn = $this->objColumnArray[$this->intSortColumnIndex]->ReverseSortByCommand; if ($mixToReturn instanceof QQOrderBy) { return $mixToReturn->GetAsManualSql(); } else { return $mixToReturn; } } } else { return null; } case "CurrentRowIndex": return $this->intCurrentRowIndex; case "SortColumnIndex": return $this->intSortColumnIndex; case "SortDirection": return $this->intSortDirection; case 'LabelForNoneFound': return $this->strLabelForNoneFound; case 'LabelForOneFound': return $this->strLabelForOneFound; case 'LabelForMultipleFound': return $this->strLabelForMultipleFound; case 'LabelForPaginated': return $this->strLabelForPaginated; case 'Owner': return $this->objOwner; case "FilterInfo": $filterArray = array(); foreach ($this->objColumnArray as $col) { $colFilterInfo = $col->FilterInfo; if ($colFilterInfo) { $filterArray[] = $colFilterInfo; } } return $filterArray; case "Conditions": //Calculate the conditions to apply to the entire grid based on the column's filters $dtgConditions = QQ::All(); foreach ($this->objColumnArray as $objColumn) { $colCondition = null; //if there's a normal filter type, return the QQConditions related to it if ($objColumn->FilterType != QFilterType::None) { $colCondition = null; if ($objColumn->ActiveFilter !== null) { $colCondition = $objColumn->ActiveFilter; } } /*FilterConstant allows us to specify a custom QQuery that applies in addition to any user-specified filters. EG: If the user enters a Cost to filter on, also filter on object actually being sold*/ if (null !== $colCondition && null !== $objColumn->FilterConstant) { $colCondition = QQ::AndCondition($colCondition, $objColumn->FilterConstant); } //now after all the above checks if the column has a condition to be specified //we add it to overall conditions. but if the column conditions are null we leave //overall conditions as is if ($colCondition !== null) { //if there are no overall conditions yet change them to reflect the column condition if ($dtgConditions == QQ::All()) { $dtgConditions = $colCondition; } else { //combine the overall conditions with the column conditions $dtgConditions = QQ::AndCondition($dtgConditions, $colCondition); } } } return $dtgConditions; case "FilterButton": if (!$this->ShowFilterButton) { return null; } if (null !== $this->btnFilter) { return $this->btnFilter; } return $this->btnFilter = $this->btnFilter_Create(); case "WaitIcon": return $this->objWaitIcon; default: try { return parent::__get($strName); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } } }