本文整理汇总了PHP中SugarBean::createRelationshipMeta方法的典型用法代码示例。如果您正苦于以下问题:PHP SugarBean::createRelationshipMeta方法的具体用法?PHP SugarBean::createRelationshipMeta怎么用?PHP SugarBean::createRelationshipMeta使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SugarBean
的用法示例。
在下文中一共展示了SugarBean::createRelationshipMeta方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: create_relationship_meta
/**
* This method has been deprecated.
* @see createRelationshipMeta()
* @deprecated 4.5.1 - Nov 14, 2006
* @static
*/
function create_relationship_meta($key, &$db, &$log, $tablename, $dictionary, $module_dir)
{
SugarBean::createRelationshipMeta($key, $db, $tablename, $dictionary, $module_dir);
}
示例2: ksort
echo "<br>";
//// END TABLE STUFF
///////////////////////////////////////////////////////////////////////////////
//// START RELATIONSHIP CREATION
ksort($rel_dictionary);
foreach ($rel_dictionary as $rel_name => $rel_data) {
$table = $rel_data['table'];
if ($setup_db_drop_tables) {
if ($db->tableExists($table)) {
$db->dropTableName($table);
}
}
if (!$db->tableExists($table)) {
$db->createTableParams($table, $rel_data['fields'], $rel_data['indices']);
}
SugarBean::createRelationshipMeta($rel_name, $db, $table, $rel_dictionary, '');
}
///////////////////////////////////////////////////////////////////////////////
//// START CREATE DEFAULTS
echo "<br>";
echo "<b>{$mod_strings['LBL_PERFORM_CREATE_DEFAULT']}</b><br>";
echo "<br>";
installLog("Begin creating Defaults");
installerHook('pre_createDefaultSettings');
if ($new_config) {
installLog("insert defaults into config table");
insert_default_settings();
}
installerHook('post_createDefaultSettings');
installerHook('pre_createUsers');
if ($new_tables) {
示例3: install_beans
function install_beans($beans)
{
foreach ($beans as $bean) {
// This forces new beans to refresh their vardefs because at this
// point the global dictionary for this object may be set with just
// relationship fields.
$rv = isset($GLOBALS['reload_vardefs']) ? $GLOBALS['reload_vardefs'] : null;
$dm = isset($_SESSION['developerMode']) ? $_SESSION['developerMode'] : null;
$GLOBALS['reload_vardefs'] = true;
$_SESSION['developerMode'] = true;
$this->log(translate('LBL_MI_IN_BEAN') . " {$bean}");
$mod = BeanFactory::getBean($bean);
if (!empty($mod) && $mod instanceof SugarBean && empty($mod->disable_vardefs)) {
//#30273
$GLOBALS['log']->debug("Creating Tables Bean : {$bean}");
$mod->create_tables();
SugarBean::createRelationshipMeta($mod->getObjectName(), $mod->db, $mod->table_name, '', $mod->module_dir);
}
// Return state. Null values essentially unset what wasn't set before
$GLOBALS['reload_vardefs'] = $rv;
$_SESSION['developerMode'] = $dm;
}
}
示例4: install_beans
function install_beans($beans)
{
include 'include/modules.php';
foreach ($beans as $bean) {
$this->log(translate('LBL_MI_IN_BEAN') . " {$bean}");
if (isset($beanList[$bean])) {
$class = $beanList[$bean];
if (file_exists($beanFiles[$class])) {
require_once $beanFiles[$class];
$mod = new $class();
//#30273
if (is_subclass_of($mod, 'SugarBean') && $mod->disable_vardefs == false) {
$GLOBALS['log']->debug("Creating Tables Bean : {$bean}");
$mod->create_tables();
SugarBean::createRelationshipMeta($mod->getObjectName(), $mod->db, $mod->table_name, '', $mod->module_dir);
}
} else {
$GLOBALS['log']->debug("File Does Not Exist:" . $beanFiles[$class]);
}
}
}
}
示例5: install_beans
function install_beans($beans)
{
include 'include/modules.php';
foreach ($beans as $bean) {
$GLOBALS['log']->debug("Installing Bean : {$bean}");
if (isset($beanList[$bean])) {
$class = $beanList[$bean];
if (file_exists($beanFiles[$class])) {
require_once $beanFiles[$class];
$mod = new $class();
if (is_subclass_of($mod, 'SugarBean')) {
$GLOBALS['log']->debug("Creating Tables Bean : {$bean}");
$mod->create_tables();
SugarBean::createRelationshipMeta($mod->getObjectName(), $mod->db, $mod->table_name, '', $mod->module_dir);
}
} else {
$GLOBALS['log']->debug("File Does Not Exist:" . $beanFiles[$class]);
}
}
}
}