displayInfo("Successfully staged " . ceil($_FILES["deployFile"]["size"] / 1024) . " KB zip file " . $_FILES["deployFile"]["name"] . " for deployment.", true, false);
        ?>
<p class='instructions'>Confirm the following deployment options:</p>
<form id='deployForm' name='deployForm' method='POST'
    action=''>
    <?php 
        print getCsrfFormTag();
        ?>
    <input type='hidden' name='deployFileTmpName' value='<?php 
        print $deployFileTmpName;
        ?>
' />
<p />
    <?php 
        $tree = new ExpandableTree("deployOptionsTree", $_SESSION[$deployFileTmpName . "_OPTIONS"]);
        $tree->setForceCollapse(true);
        $tree->printTree();
        ?>
<p />
    <?php 
        if (!isset($_POST['checkOnly'])) {
            displayWarning("Warning, this deployment will make permanent changes to this organization's metadata and cannot be rolled back. " . "Use the 'Check Only' option to validate this deployment without making changes.");
            print "<p/>";
        }
        ?>
 <input type='submit' name='deploymentConfirmed' value='Deploy' />
</form>
    <?php 
    } else {
        require_once 'header.php';
        ?>
Пример #2
0
</form>
<br/>

<?php 
if (WorkbenchContext::get()->getDefaultObject()) {
    $describeSObjectResult = WorkbenchContext::get()->describeSObjects(WorkbenchContext::get()->getDefaultObject());
    $alwaysArrayChildren = array("recordTypeInfos", "childRelationships");
    foreach ($alwaysArrayChildren as $child) {
        if (isset($describeSObjectResult->{$child}) && !is_array($describeSObjectResult->{$child})) {
            $describeSObjectResult->{$child} = array($describeSObjectResult->{$child});
        }
    }
    $forceCollapse = WorkbenchContext::get()->hasDefaultObjectChanged();
    $processedResults = ExpandableTree::processResults($describeSObjectResult, "Attributes", true);
    ?>
    <div class="legend">
        <strong>Legend:</strong>
        <ul>
            <li class="trueColor">True</li>
            <li class="falseColor">False</li>
            <li class="highlightCustomField">Custom Field</li>
            <li class="highlightSystemField">System Field</li>
        </ul>
    </div>
    <?php 
    $tree = new ExpandableTree("describeTree", $processedResults);
    $tree->setForceCollapse($forceCollapse);
    $tree->setAdditionalMenus(ExpandableTree::getClearCacheMenu());
    $tree->printTree();
}
require_once 'footer.php';
<p />

<?php 
if (isset($typeString)) {
    if (!isset($metadataTypeMap[$typeString])) {
        if (isset($_REQUEST['type']) && $_REQUEST['type']) {
            displayError("Invalid metadata type type: {$typeString}", false, true);
        }
        exit;
    }
    $type = $metadataTypeMap[$typeString];
    $_SESSION['defaultMetadataType'] = $typeString;
    $metadataComponents = listMetadata($type);
    $componentsLabel = "Components (" . count($metadataComponents) . ")";
    $tree = new ExpandableTree("listMetadataTree", array("Type Description" => $type, $componentsLabel => $metadataComponents));
    $tree->setForceCollapse($typeStringChanged);
    $tree->setContainsIds(true);
    $tree->setContainsDates(true);
    $tree->printTree();
}
require_once 'footer.php';
function listMetadata($type)
{
    try {
        if (isset($type->childXmlName)) {
            return processListMetadataResult(WorkbenchContext::get()->getMetadataConnection()->listMetadata($type->childXmlName, null, WorkbenchContext::get()->getApiVersion()));
        }
        if (!$type->inFolder) {
            return processListMetadataResult(WorkbenchContext::get()->getMetadataConnection()->listMetadata($type->xmlName, null, WorkbenchContext::get()->getApiVersion()));
        }
        $folderType = $type->xmlName == "EmailTemplate" ? "Email" : $type->xmlName;