Id()] = $Schema->Name() . " Schema"; } $OptList = new HtmlOptionList("SC", $Options, $SchemaInUse->Id()); $OptList->SubmitOnChange(true); $OptList->PrintHtml(); } /** * Print a search URL to find resources associated with a given controlled name. * @param ControlledName $CName Target controlled name */ function GetSearchUrl(ControlledName $CName): string { $SearchParams = new SearchParameterSet(); $SearchParams->AddParameter("=".$CName->Name(), $CName->FieldId()); return "index.php?P=SearchResults&" .$SearchParams->UrlParameterString(); } # ----- SETUP ---------------------------------------------------------------- if (!isset($H_Schema)) { throw new Exception("H_Schema not defined."); } if (!isset($H_OptionFields)) { $H_OptionFields = null; } if (isset($G_Field)) { if (!isset($H_OptionNames)) { throw new Exception("H_OptionNames not defined."); } if (!isset($H_Options)) { throw new Exception("H_Options not defined."); } } $CancelButton = new HtmlButton("Cancel"); $CancelButton->setIcon("Cross.svg"); $CancelButton->addSemanticClass("btn-danger"); $CancelButton->makeSubmitButton(); $SaveButton = new HtmlButton("Save Changes"); $SaveButton->setIcon("Disk.svg"); $SaveButton->makeSubmitButton(); $EditButton = new HtmlButton("Edit"); $EditButton->setIcon("Pencil.svg"); $EditButton->setSize(HtmlButton::SIZE_SMALL); $ExportButton = new HtmlButton("Export"); $ExportButton->setIcon("FileExport.svg"); $ExportButton->setSize(HtmlButton::SIZE_SMALL); $AF = ApplicationFramework::getInstance(); $SafeSchemaId = defaulthtmlentities($H_Schema->Id()); # ----- DISPLAY -------------------------------------------------------------- ?>

# Edit Options for GetDisplayName(); ?>

getHtml() ?> getHtml() ?>

(selection on the left selects the default valueAllowMultiple() ? "s" : ""; ?> for field)

Update Unset Values With Default Value(s)?

"(no change)"] + $H_OptionNames; $Index = 0; $DefaultValue = $G_Field->DefaultValue(); foreach ($H_Options as $Id => $CName) { $Qualifier = $CName->Qualifier(); $QName = $Qualifier ? $Qualifier->Name() : ""; $Selected = is_array($DefaultValue) ? in_array($Id, $DefaultValue) : $Id == $DefaultValue; if ($Selected) { $DefaultFound = true; } ?>
AllowMultiple()) { ?> /> /> |  |  | ( getAssociatedResources())) ?> resources ) | InUse()) { ?> remap to PrintHtml(); ?> | " /> Delete
AllowMultiple()) { ?> /> | no default | "> add new option: UsesQualifiers()) { $Qualifiers = $G_Field->AssociatedQualifierList(); if (count($Qualifiers) == 1 && $G_Field->HasItemLevelQualifiers() != true) { $QualifierIds = array_keys($Qualifiers); $Qualifier = array_pop($Qualifiers); $QualifierId = array_pop($QualifierIds); print $Qualifier; print ''; } elseif (count($Qualifiers) >= 1) { $Qualifiers = [-1 => "--"] + $Qualifiers; (new HtmlOptionList( "F_AddQualifier", $Qualifiers, $G_Field->DefaultQualifier() ))->PrintHtml(); } } ?> | getHtml() ?> getHtml() ?>

# Edit Option List

No Option fields were found for editing.

GetItemCount(); foreach ($H_OptionFields as $Field) { $CNFactory = new ControlledNameFactory($Field->Id()); $EditButton->setLink("index.php?P=EditOptionList&FI=" . $Field->Id()); $ExportButton->setLink("index.php?P=DBExportField&Id=" . $Field->Id()); if ($ResourceCount) { $UsageCount = $CNFactory->GetUsageCount(); $UsagePercentage = round(($UsageCount * 100) / $ResourceCount); } else { $UsageCount = 0; $UsagePercentage = 0; } ?>
GetDisplayName(); ?> | (GetPossibleValues()); ?> values) | getHtml(); ?> getHtml(); ?> | Description(); ?> | Assigned to Resources (%)