protected function _getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage) { $iModule = 0; if (strpos($sFilter, $this->sParamsDivider) !== false) { list($iModule, $sFilter) = explode($this->sParamsDivider, $sFilter); } $aLanguage = array(); $iLanguage = $this->oDb->getLanguagesBy(array('type' => 'default'), $aLanguage); if ($iLanguage <= 0 || empty($aLanguage)) { $aLanguages = array(); $iLanguages = $this->oDb->getLanguagesBy(array('type' => 'active'), $aLanguages); if ($iLanguages <= 0 || empty($aLanguages)) { return array(); } $aLanguage = $aLanguages[0]; } $this->_aOptions['source'] = sprintf($this->_aOptions['source'], $aLanguage['id']); if ((int) $iModule != 0) { $this->_aOptions['source'] .= $this->oDb->prepare(" AND `tlk`.`IDCategory`=?", $iModule); } $aResults = parent::_getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage); foreach ($aResults as $iIndex => $aResult) { $aKey = $this->oDb->getKeyFullInfo($aResult['id'], $this->iPreviewLength); if (empty($aKey)) { continue; } $aResults[$iIndex]['module'] = $aKey['module']; $aResults[$iIndex]['string'] = $aKey['strings'][$aLanguage['name']]['preview']; $aResults[$iIndex]['languages'] = implode(', ', array_keys($aKey['strings'])); } return $aResults; }
protected function _getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage) { if (empty($this->sList)) { return array(); } $this->_aOptions['source'] .= $this->oDb->prepare(" AND `Key`=? ", $this->sList); return parent::_getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage); }
protected function _getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage) { if (empty($this->sObject) || empty($this->sDisplay)) { return array(); } $this->oDb->checkInputsInDisplays($this->sObject, $this->sDisplay); $this->_aOptions['source'] = $this->oDb->prepare($this->_aOptions['source'], $this->sObject, $this->sDisplay); return parent::_getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage); }
protected function _getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage) { $sModule = ''; if (strpos($sFilter, $this->sParamsDivider) !== false) { list($sModule, $sFilter) = explode($this->sParamsDivider, $sFilter); } if ($sModule != '') { $this->_aOptions['source'] .= $this->oDb->prepare(" AND `module`=?", $sModule); } return parent::_getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage); }
protected function _getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage) { $sModule = ''; if (strpos($sFilter, $this->sParamsDivider) !== false) { list($sModule, $sFilter) = explode($this->sParamsDivider, $sFilter); } if ($sModule != '') { $this->_aOptions['source'] .= $this->oDb->prepare(" AND `module`=?", $sModule); } $aResults = parent::_getDataSql($sFilter, !empty($sOrderField) ? $sOrderField : 'title', $sOrderDir, $iStart, $iPerPage); $aLists = array(); $this->oDb->getLists(array('type' => 'pairs_list_values'), $aLists, false); foreach ($aResults as $iKey => $aResult) { if (isset($aLists[$aResult['key']])) { $aResults[$iKey]['values_count'] = (int) $aLists[$aResult['key']]; } } return $aResults; }
protected function _getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage) { if (empty($this->iLevel)) { return array(); } $sModule = ''; if (strpos($sFilter, $this->sParamsDivider) !== false) { list($sModule, $sFilter) = explode($this->sParamsDivider, $sFilter); } if ($sModule != '') { $this->_aOptions['source'] .= $this->oDb->prepare(" AND `Module`=?", $sModule); } $this->_aOptions['source'] .= $this->oDb->prepare(" AND (`DisabledForLevels`='0' OR `DisabledForLevels`&?=0)", pow(2, $this->iLevel - 1)); $aActions = parent::_getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage); $aActionsActive = array(); $iActionsActive = $this->oDb->getActions(array('type' => 'by_level_id_key_id', 'value' => $this->iLevel), $aActionsActive); foreach ($aActions as $iKey => $aAction) { $aActions[$iKey]['Active'] = array_key_exists($aAction['ID'], $aActionsActive) ? 1 : 0; } return $aActions; }
protected function _getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage) { $this->_aOptions['source'] .= $this->oDb->prepare("AND `IDLEvel`=? ", $this->iLevel); return parent::_getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage); }
protected function _getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage) { $this->_aOptions['source'] .= " AND `name`<>'system'"; $aData = array(array('id' => 0, 'title' => _t('_bx_dev_pgt_txt_manage_modules_all'), 'uri' => $this->sAllUri)); return array_merge($aData, parent::_getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage)); }
function __construct($aOptions, $oTemplate = false) { parent::__construct($aOptions, $oTemplate); }
public function __construct($aOptions, $oTemplate = false) { parent::__construct($aOptions, $oTemplate); $this->oDb = new BxDolStudioPermissionsQuery(); }