/** * @copydoc Grid::__construct */ public function __construct($name, array $params = null) { parent::__construct($name, $params); $this->setTableName('frm_forms'); $this->setSaver(new FormsSaver()); $this->setOrder(array('form_creation_date' => QAL::DESC)); }
/** * @copydoc Grid::__construct */ public function __construct($name, array $params = NULL) { parent::__construct($name, $params); $linkedID = $this->getParam('linkedID'); $pk = $this->getParam('pk'); if ($this->getState() != 'save') { if ($linkedID) { $this->addFilterCondition([$pk => $linkedID]); } else { $this->addFilterCondition([$pk => NULL, 'session_id' => session_id()]); } } $quick_upload_path = $this->getConfigValue('repositories.quick_upload_path', 'uploads/public'); $quick_upload_pid = $this->dbh->getScalar('SELECT upl_id FROM share_uploads WHERE upl_path=%s LIMIT 1', $quick_upload_path); $quick_upload_enabled = true; $columns = $this->dbh->getColumnsInfo($this->getTableName()); if ($columns) { foreach ($columns as $colName => $colProps) { if ((empty($colProps['index']) or $colProps['index'] != 'PRI') and $colName != 'upl_id' and strpos($colName, 'order_num') === false and !$colProps['nullable']) { $quick_upload_enabled = false; } } } if ($langTable = $this->dbh->getTranslationTablename($this->getTableName())) { $lang_columns = $this->dbh->getColumnsInfo($langTable); foreach ($lang_columns as $colName => $colProps) { if ((empty($colProps['index']) or $colProps['index'] != 'PRI') and $colName != 'upl_id' and strpos($colName, 'order_num') === false and !$colProps['nullable']) { $quick_upload_enabled = false; } } } $this->setProperty('quickUploadPath', $quick_upload_path); $this->setProperty('quickUploadPid', $quick_upload_pid); $this->setProperty('quickUploadEnabled', $quick_upload_enabled); }
/** * @copydoc Grid::__construct */ public function __construct($name, array $params = NULL) { parent::__construct($name, $params); $this->setTableName('share_domains'); $filter = ' (domain_id NOT IN (SELECT domain_id FROM share_domain2site)) '; if ($this->getParam('siteID')) { $filter .= ' OR (domain_id IN (SELECT domain_id FROM share_domain2site WHERE site_id = ' . $this->getParam('siteID') . '))'; } $this->setFilter($filter); }
/** * @copydoc Grid::__construct */ public function __construct($name, array $params = null) { parent::__construct($name, $params); $this->setTableName('share_sitemap'); $this->setTitle($this->translate('TXT_DIVISION_EDITOR')); $this->setParam('recordsPerPage', false); $sp = $this->getStateParams(true); if ($this->getParam('site') && is_numeric($this->getParam('site')) && !isset($sp['site_id'])) { $this->setStateParam('site_id', (int) $this->getParam('site')); } }
public function __construct($name, array $params = null) { parent::__construct($name, $params); $this->setTableName('apps_vote_question'); $filter = ' (vote_id IS NULL) '; if ($this->getParam('voteID')) { $filter .= ' OR (vote_id =' . $this->getParam('voteID') . ')'; } $filter = '(' . $filter . ')'; $this->setFilter($filter); }
public function __construct($name, array $params = null) { parent::__construct($name, $params); $this->setTableName('mail_subscriptions2users'); if (is_numeric($this->getParam('subscriptionID'))) { $filter = sprintf(' (subscription_id = %s) ', $this->getParam('subscriptionID')); } else { $filter = sprintf(' (subscription_id IS NULL and session_id="%s") ', session_id()); } $this->setFilter($filter); }
/** * @copydoc Grid::__construct */ public function __construct($name, array $params = null) { parent::__construct($name, $params); //Якщо ідентифікатор форми вказаний невірно або не вказаний, то не вивалювати помилку, а красиво показати. if (!($this->formID = $this->getParam('form_id'))) { $this->formID = false; } else { $this->setTableName(FormConstructor::getDatabase() . '.form_' . $this->formID); } $this->setOrder(array('pk_id' => QAL::DESC)); }
/** * @copydoc Grid::__construct */ public function __construct($name, array $params = null) { /* * финт ушами связанный с заменой PHP * "." на "_" * поэтому мы получаем POST по хитрому */ $_POST = getRealPOST(); parent::__construct($name, $params); $this->setTableName($this->getParam('table_name')); //stop(file_get_contents("php://input"), $_POST, $_POST[$this->getTableName()]); }
/** * @copydoc Grid::__construct */ public function __construct($name, array $params = null) { parent::__construct($name, $params); $this->setTableName('share_sites_properties'); $this->setSaver(new SitePropertiesSaver()); // Если передан параметр siteID, // то будем считать, что мы открыли редактор свойств конкретного сайта, // в противном случае просто открываем редактор. if (array_key_exists('siteID', $params)) { $this->addFilterCondition('site_id = ' . intval($params['siteID']) . ' OR site_id IS NULL'); } }
/** * @copydoc Grid::__construct * * @throws SystemException 'Please set `comment_tables` parameter in comments_editor.content.xml file' */ public function __construct($name, array $params = NULL) { parent::__construct($name, $params); $this->commentTables = $this->getParam('comment_tables'); if (!$this->commentTables) { throw new SystemException('Please set `comment_tables` parameter in comments_editor.content.xml file'); } if (!is_array($this->commentTables)) { $this->commentTables = [$this->commentTables]; } $this->changeTableName(); $this->setOrder(['comment_created' => QAL::DESC]); $this->setParam('onlyCurrentLang', true); }
/** * @copydoc Grid::__construct */ public function __construct($name, array $params = null) { parent::__construct($name, $params); $this->repoinfo = E()->FileRepoInfo; $this->setTableName('share_uploads'); $this->setFilter(['upl_is_active' => 1]); $this->setOrder(['upl_publication_date' => QAL::DESC]); $this->addTranslation('TXT_NOT_READY', 'FIELD_UPL_IS_READY', 'ERR_UPL_NOT_READY'); //Если данные пришли из модального окна if (isset($_POST['modalBoxData']) && ($d = json_decode($_POST['modalBoxData']))) { if (isset($d->upl_pid) && ($uplPID = $this->dbh->getScalar($this->getTableName(), 'upl_id', ['upl_id' => $d->upl_pid])) || isset($d->upl_path) && ($uplPID = $this->dbh->getScalar($this->getTableName(), 'upl_pid', ['upl_path' => $d->upl_path]))) { $this->response->addCookie(self::STORED_PID, $uplPID, 0, E()->getSiteManager()->getCurrentSite()->host, E()->getSiteManager()->getCurrentSite()->root); } } }
/** * @copydoc Grid::__construct */ public function __construct($name, array $params = null) { parent::__construct($name, $params); $this->setTableName('share_languages'); $this->setTitle($this->translate('TXT_LANGUAGE_EDITOR')); }
/** * @copydoc Grid::__construct */ public function __construct($name, array $params = null) { parent::__construct($name, $params); $this->setTableName('share_widgets'); $this->setOrder(array('widget_name' => QAL::ASC)); }
public function __construct($name, array $params = null) { parent::__construct($name, $params); $this->setTableName('mail_templates'); $this->setTitle($this->translate('TXT_MAIL_TEMPLATES_EDITOR')); }
/** * @copydoc Grid::__construct */ public function __construct($name, array $params = null) { parent::__construct($name, $params); $this->setTableName('apps_vote'); }
/** * @copydoc Grid::__construct */ public function __construct($name, array $params = null) { parent::__construct($name, $params); $this->setTableName('share_sites'); $this->setSaver(new SiteSaver()); }
/** * @copydoc Grid::__construct */ public function __construct($name, array $params = null) { parent::__construct($name, $params); $this->setTableName('user_groups'); $this->setTitle($this->translate('TXT_ROLE_EDITOR')); }
function __construct($name, array $params = NULL) { parent::__construct($name, $params); $this->setTableName('share_action_log'); $this->setOrder(['al_date' => QAL::DESC]); }
public function __construct($name, array $params = NULL) { parent::__construct($name, $params); $this->setTableName('mail_subscriptions'); $this->setTitle($this->translate('TXT_MAIL_SUBSCRIPTION_EDITOR')); }
/** * @copydoc Grid::__construct */ public function __construct($name, array $params = null) { parent::__construct($name, $params); $this->setOrder(array('feed_date' => QAL::DESC)); }
public function __construct($name, $module, array $params = NULL) { parent::__construct($name, $module, $params); $this->setTableName('mail_email_subscribers'); $this->setOrder(['me_date' => QAL::ASC]); }
/** * @copydoc Grid::__construct */ public function __construct($name, array $params = null) { parent::__construct($name, $params); $this->setTableName(TagManager::TAG_TABLENAME); }
public function __construct($name, array $params = null) { parent::__construct($name, $params); $this->setTableName('ads_types'); $this->setTitle($this->translate('TXT_ADS_TYPES_EDITOR')); }