本文整理汇总了PHP中modX::getFullTableName方法的典型用法代码示例。如果您正苦于以下问题:PHP modX::getFullTableName方法的具体用法?PHP modX::getFullTableName怎么用?PHP modX::getFullTableName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类modX
的用法示例。
在下文中一共展示了modX::getFullTableName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: displayModule
/**
* Returns the parsed module template
* @return string
*/
function displayModule()
{
include 'lang/' . $this->language['languagefile'] . '.managerwidgets.php';
if ($this->configIsSet()) {
$theme = $this->modx->db->select('setting_value', $this->modx->getFullTableName('system_settings'), 'setting_name=\'manager_theme\'', '');
$theme = $this->modx->db->getRow($theme);
$theme = $theme['setting_value'] != '' ? '/' . $theme['setting_value'] : '';
$widgets = array();
foreach ($piwikWidgets as $piwikWidget) {
$this->chunkie->setPlaceholder('', $piwikWidget, 'widget');
$this->chunkie->setPlaceholder('piwikURL', 'http://' . $this->options['piwikURL'], 'widget');
$this->chunkie->setPlaceholder('piwikSiteId', $this->options['piwikSiteId'], 'widget');
$this->chunkie->setPlaceholder('piwikTokenAuth', $this->options['piwikTokenAuth'], 'widget');
$this->chunkie->setTpl($this->chunkie->getTemplateChunk('@FILE templates/widget.template.html'));
$this->chunkie->prepareTemplate('', array(), 'widget');
$widgets[] = $this->chunkie->process('widget');
}
$this->chunkie->setPlaceholder('widgets', implode("\n", $widgets), 'module');
$this->chunkie->setPlaceholder('language', $this->language, 'module');
$this->chunkie->setPlaceholder('piwikURL', 'http://' . $this->options['piwikURL'], 'module');
$this->chunkie->setPlaceholder('piwikSiteId', $this->options['piwikSiteId'], 'module');
$this->chunkie->setPlaceholder('piwikTokenAuth', $this->options['piwikTokenAuth'], 'module');
$this->chunkie->setPlaceholder('managertheme', $theme, 'module');
$this->chunkie->setTpl($this->chunkie->getTemplateChunk('@FILE templates/module.template.html'));
$this->chunkie->prepareTemplate('', array(), 'module');
$template = $this->chunkie->process('module');
} else {
$theme = $this->modx->db->select('setting_value', $this->modx->getFullTableName('system_settings'), 'setting_name=\'manager_theme\'', '');
$theme = $this->modx->db->getRow($theme);
$theme = $theme['setting_value'] != '' ? '/' . $theme['setting_value'] : '';
$this->chunkie->setPlaceholder('language', $this->language, 'module');
$this->chunkie->setPlaceholder('managertheme', $theme, 'module');
$this->chunkie->setTpl($this->chunkie->getTemplateChunk('@FILE templates/noconfig.template.html'));
$this->chunkie->prepareTemplate('', array(), 'module');
$template = $this->chunkie->process('module');
}
return $template;
}
示例2: xPDO
$can_migrate_comments = $modx->addPackage('quip', '../../components/quip/model/', $modx->db->config['table_prefix']);
// Now instantiate a new xpdo object and add our wordpress package. This gives
// us the ability to make queries on the wordpress database as an xpdo object.
$wp = new xPDO('mysql:host=' . $wp_database_host . ';dbname=' . $wp_database_name . ';charset=' . $wp_database_charset, $wp_database_username, $wp_database_password);
$can_migrate_wp = $wp->addPackage('wordpress', '../', $wp_database_prefix);
if (!$can_migrate_wp) {
die('Wordpress Package could not be loaded.');
}
/**
* during migrations where you need to try, try and try again to get it right,
* it's easier to truncate the tables here instead of doing it manually.
* setting $empty_tables to true will delete data from the following tables.
*/
if ($empty_tables) {
if ($can_migrate_comments) {
$modx->db->query('TRUNCATE ' . $modx->getFullTableName('quip_comments'));
$modx->db->query('TRUNCATE ' . $modx->getFullTableName('quip_comments_closure'));
}
$modx->db->query('TRUNCATE ' . $modx->getFullTableName('site_content'));
$modx->db->query('TRUNCATE ' . $modx->getFullTableName('site_templates') . 'WHERE id != 1');
$modx->db->query('TRUNCATE ' . $modx->getFullTableName('site_tmplvars'));
$modx->db->query('TRUNCATE ' . $modx->getFullTableName('site_tmplvar_contentvalues'));
$modx->db->query('TRUNCATE ' . $modx->getFullTableName('site_tmplvar_templates'));
}
// first set up the document parents
$post_parent = setupParent($post_document_parent, 'Post');
if ($post_parent === false) {
die('There was an error setting up the post parent.
Check your configuration value for $post_document_parent');
}
$page_parent = setupParent($page_document_parent, 'Page');