本文整理汇总了PHP中ReadPermissionsOptimizationUtil::recreateTable方法的典型用法代码示例。如果您正苦于以下问题:PHP ReadPermissionsOptimizationUtil::recreateTable方法的具体用法?PHP ReadPermissionsOptimizationUtil::recreateTable怎么用?PHP ReadPermissionsOptimizationUtil::recreateTable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ReadPermissionsOptimizationUtil
的用法示例。
在下文中一共展示了ReadPermissionsOptimizationUtil::recreateTable方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
ZurmoDatabaseCompatibilityUtil::dropStoredFunctionsAndProcedures();
SecurityTestHelper::createSuperAdmin();
SecurityTestHelper::createUsers();
SecurityTestHelper::createGroups();
SecurityTestHelper::createRoles();
RedBeanModel::forgetAll();
//do the rebuild to ensure the tables get created properly.
ReadPermissionsOptimizationUtil::rebuild();
//Manually build the test model munge tables.
ReadPermissionsOptimizationUtil::recreateTable(ReadPermissionsOptimizationUtil::getMungeTableName('OwnedSecurableTestItem'));
ReadPermissionsOptimizationUtil::recreateTable(ReadPermissionsOptimizationUtil::getMungeTableName('OwnedSecurableTestItem2'));
$benny = User::getByUsername('benny');
$model = new OwnedSecurableTestItem();
$model->member = 'test';
assert($model->save());
// Not Coding Standard
$model = new OwnedSecurableTestItem();
$model->member = 'test2';
assert($model->save());
// Not Coding Standard
$model = new OwnedSecurableTestItem();
$model->member = 'test3';
$model->owner = $benny;
assert($model->save());
// Not Coding Standard
assert(OwnedSecurableTestItem::getCount() == 3);
// Not Coding Standard
$model = new OwnedSecurableTestItem2();
$model->member = 'test5';
assert($model->save());
// Not Coding Standard
}
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:35,代码来源:OwnedSecurableItemReadPermissionOptimizationTest.php
示例2: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
ZurmoDatabaseCompatibilityUtil::dropStoredFunctionsAndProcedures();
SecurityTestHelper::createSuperAdmin();
//do the rebuild to ensure the tables get created properly.
AllPermissionsOptimizationUtil::rebuild();
//Manually build the test model munge tables.
ReadPermissionsOptimizationUtil::recreateTable(ReadPermissionsOptimizationUtil::getMungeTableName('OwnedSecurableTestItem'));
}
示例3: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
SecurityTestHelper::createSuperAdmin();
$jim = UserTestHelper::createBasicUser('jim');
$values = array('Multi 1', 'Multi 2', 'Multi 3');
$customFieldData = CustomFieldData::getByName('ImportTestMultiDropDown');
$customFieldData->serializedData = serialize($values);
$saved = $customFieldData->save();
assert($saved);
// Not Coding Standard
$values = array('Cloud 1', 'Cloud 2', 'Cloud 3');
$customFieldData = CustomFieldData::getByName('ImportTestTagCloud');
$customFieldData->serializedData = serialize($values);
$saved = $customFieldData->save();
assert($saved);
// Not Coding Standard
ReadPermissionsOptimizationUtil::recreateTable(ReadPermissionsOptimizationUtil::getMungeTableName('ImportModelTestItem'));
}
示例4: buildReadPermissionsOptimizationTableForTestModels
protected static function buildReadPermissionsOptimizationTableForTestModels()
{
foreach (static::$dependentTestModelClassNames as $modelClassName) {
if (is_subclass_of($modelClassName, 'SecurableItem') && $modelClassName::hasReadPermissionsOptimization()) {
ReadPermissionsOptimizationUtil::recreateTable(ReadPermissionsOptimizationUtil::getMungeTableName($modelClassName));
}
}
}