本文整理汇总了PHP中Admin_DA::_getUniqueName方法的典型用法代码示例。如果您正苦于以下问题:PHP Admin_DA::_getUniqueName方法的具体用法?PHP Admin_DA::_getUniqueName怎么用?PHP Admin_DA::_getUniqueName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Admin_DA
的用法示例。
在下文中一共展示了Admin_DA::_getUniqueName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: test_getUniqueName
function test_getUniqueName()
{
$entities = array();
for ($x = 0; $x < 20; $x++) {
$entities[] = array('name' => 'foo_' . $x);
}
$control = array('name' => 'foo_7');
$orig = $control;
Admin_DA::_getUniqueName($control, $entities, 'copy');
$this->assertTrue(is_array($control));
$this->assertTrue(array_key_exists('name', $control));
$this->assertNotEqual($orig, $control);
}
示例2: _duplicateZone
function _duplicateZone($aZone, $checkUniqueNames = false)
{
$zoneId = $aZone['zone_id'];
unset($aZone['zone_id']);
if ($checkUniqueNames) {
$aZones = Admin_DA::getZones(array('publisher_id' => $aZone['publisher_id']));
Admin_DA::_getUniqueName($aZone, $aZones, @$GLOBALS['strCopy']);
}
$newZoneId = Admin_DA::addZone($aZone);
// FIXME
$aPlacementZones = Admin_DA::_getEntities('placement_zone_assoc', array('zone_id' => $zoneId));
foreach ($aPlacementZones as $aPlacementZone) {
$aPlacementZone['zone_id'] = $newZoneId;
Admin_DA::duplicatePlacementZone($aPlacementZone);
}
$aAdZones = Admin_DA::getAdZones(array('zone_id' => $zoneId));
foreach ($aAdZones as $aAdZone) {
$aAdZone['zone_id'] = $newZoneId;
Admin_DA::duplicateAdZone($aAdZone);
}
return $newZoneId;
}