"No", 1 => "Yes"]; } /** * Get an array of options available for a privilege value.The array keys are * values for the form and the values are the labels for the form. * @return array array of privilege options */ function GetPrivilegeOptions() { $PrivilegeFactory = new PrivilegeFactory(); return ["--" => "--"] + $PrivilegeFactory->GetPrivileges(true, false); } /** * Get an array of options available for SearchGroupLogic. * @return array of options */ function GetSearchGroupLogicOptions() { return [ SearchEngine::LOGIC_OR => "OR", SearchEngine::LOGIC_AND => "AND" ]; } /** * Get the escaped option text and value for a flag value. * @param int $State TRUE if the flag is on and FALSE if the flag is OFF * @return array the first value is the text, the second is the value */ function GetSafeFlagOption($State) { return [ defaulthtmlentities(StdLib::getArrayValue(GetFlagOptions(), $State ? 1 : 0)), defaulthtmlentities($State ? 1 : 0) ]; } /** * Print the type field for the given metadata field data. * @param array $Data metadata field data * @param string|null $Error field error, if one exists * @return void */ function PrintTypeField(array $Data, $Error) { $AllowedTypes = MakeTypesHumanReadable($Data["AllowedTypes"]); $HasNoAllowedTypes = !count($AllowedTypes); $SafeType = defaulthtmlentities($Data["Type"]); $SafeTypeName = defaulthtmlentities(MetadataField::$FieldTypeHumanEnums[$Data["Type"]]); ?> PrintHtml(); ?> All fields. Schema Name() ?> All fields. All fields. All fields. All fields. All fields. All fields. PrintHtml(); ?> All fields. PrintHtml(); ?> All fields. PrintHtml(); ?> Text, Paragraph, Number, Date, Timestamp, Flag, Tree, Controlled Name, Option, User, Image, File, URL, and Point fields. PrintHtml(); ?> Text, Paragraph, Number, Date, Timestamp, Flag, Tree, Controlled Name, Option, Image, File, URL, and Point fields. PrintHtml(); ?> Text, Paragraph, Number, Date, Timestamp, Flag, Tree, Controlled Name, Option, Image, File, URL, Email, and Point fields. PrintHtml(); ?> All fields. PrintHtml(); ?> Email fields. "--"] + $Options; ?> PrintHtml(); ?> Text, Paragraph, Number, Date, Timestamp, Flag, Tree, Controlled Name, Option, Image, File, URL, and Point fields. Size(8); $OptList->MultipleAllowed(true); $OptList->PrintHtml(); ?> Text, Paragraph, Number, Date, Timestamp, Flag, Tree, Controlled Name, Option, Image, File, URL, Email, and Point fields. PrintHtml(); ?>     (on the full record page) Text, Paragraph, Number, Date, Timestamp, Flag, Tree, Controlled Name, Option, Image, File, URL, and Point fields. PrintHtml(); ?> Text, Paragraph, Number, Tree, Controlled Name, Option, User, Image, File, and URL fields. PrintHtml(); ?> Text, Paragraph, Number, Date, Timestamp, Flag, Tree, Controlled Name, Option, User, Image, File, URL, and Reference fields. PrintHtml(); ?> Tree, Controlled Name, and Option fields. PrintHtml(); ?> Text, Number, Date, Timestamp, and URL fields. (1-20) Text, Paragraph, Number, Date, Timestamp, Tree, Controlled Name, Option, User, Image, File, URL, and Reference fields. PrintHtml(); ?> (determines how multiple selections for this field are combined) Tree, Controlled Name, and Option fields. PrintHtml(); ?> (determines if search facets will show all top-level terms for the given field rather than only those associated with the current set of search results) Tree, Controlled Name, and Option fields. (1 or more) Tree and Controlled Name fields. (1 or more) Tree, Controlled Name, and Reference fields. (10 or more) Tree, Controlled Name, and Reference fields. PrintHtml(); ?> Tree, Controlled Name, and Option fields. PrintHtml(); ?> Tree fields. (1 or more)
When Display As List For Advanced Search is enabled, this sets the maximum number of levels of a Tree field to include in the list (e.g., 1 to only list top-level classifications). Tree fields. characters Text, Number, Date, and Point fields. characters characters
(Note: making this value smaller will not truncate any existing field values) Text and URL fields. None"; } ?> Text and Paragraph fields. None"; } ?> Number fields. $Data["FlagOffLabel"] ?? MetadataField::getDefaultValue("FlagOffLabel"), 1 => $Data["FlagOnLabel"] ?? MetadataField::getDefaultValue("FlagOnLabel"), ]; $SafeText = defaulthtmlentities($Value ? $Options[1] : $Options[0]); $SafeValue = defaulthtmlentities($Value ? 1 : 0); ?> PrintHtml(); ?> Flag fields. null, "Y" => null]; $SafeValue = defaulthtmlentities($DefaultValue["X"]); $SafeValue2 = defaulthtmlentities($DefaultValue["Y"]); if ($Data["HasOwner"]) { if (!strlen($SafeValue)) { $SafeValue = "None"; } if (!strlen($SafeValue2)) { $SafeValue2 = "None"; } } ?> X: , Y: Point fields. PrintHtml(); ?> Tree and Paragraph fields. Number fields. Number fields. digits to the left of the decimal point digits to the left of the decimal point Point fields. digits to the right of the decimal point digits to the right of the decimal point Point fields. PrintIfEmpty(false); $OptList->PrintHtml(); ?> Timestamp and User fields. Paragraph fields. Paragraph fields. PrintHtml(); ?> Paragraph fields. Flag fields. Flag fields. PrintHtml(); ?> Option fields. GetPrivileges(true, false); $Selected = $Data["UserPrivilegeRestrictions"]; ?> Size(8); $OptList->MultipleAllowed(true); $OptList->PrintHtml(); ?> User fields. ViewingPrivileges(); ?> Viewing Permissions Schema requirements are:  Edit

This field separately requires: DisplaySet("ViewingPrivileges", $Data["ViewingPrivileges"]); ?> All fields. AuthoringPrivileges(); ?> Authoring Permissions Schema requirements are:  Edit

This field separately requires: DisplaySet("AuthoringPrivileges", $Data["AuthoringPrivileges"]); ?> All fields. EditingPrivileges(); ?> Editing Permissions Schema requirements are:  Edit

This field separately requires: DisplaySet("EditingPrivileges", $Data["EditingPrivileges"]); ?> All fields. Id()] = $Schema->Name(); } $OptionList = new HtmlOptionList( "F_ReferenceableSchemaIds[]", $OptionValues, $Data["ReferenceableSchemaIds"] ); $OptionList->MultipleAllowed(true); $OptionList->Size(count($Schemas)); ?> Referenceable Schemas PrintHtml(); ?> Reference fields. usesAndLogic() ? "AND" : "OR"; $Conditions = $PrivilegeSet->getConditions(); $Subsets = $PrivilegeSet->getSubsets(); $RequiredUserPrivileges = $PrivilegeSet->getPrivileges(); $AllSchemas = MetadataSchema::GetAllSchemas(); # map of friendly names for operators $OpNames = [ "==" => "is", "!=" => "is not", ">" => "is greater than", "<" => "is less than" ]; # construct an array to hold descriptions of each priv element $Elements = []; # foreach user privilege foreach ($RequiredUserPrivileges as $Privilege) { $PrivFlag = new Privilege($Privilege); $Elements [] = "Current user has ".$PrivFlag->Name()." privilege"; } # foreach condition foreach ($Conditions as $Condition) { # field conditions try { # get the field $Field = new MetadataField($Condition["FieldId"]); $Prefix = $AllSchemas[$Field->SchemaId()]->AbbreviatedName(); $SafeName = defaulthtmlentities("[".$Prefix."] " .$Field->GetDisplayName()); $SafeOperator = $OpNames[ $Condition["Operator"] ]; # proper dislpay of 'current user' tests against user fields if ($Field->Type() == MetadataSchema::MDFTYPE_USER && is_null($Condition["Value"])) { $SafeValue = "current user"; } elseif ($Field->Type() == MetadataSchema::MDFTYPE_OPTION) { # proper display of cname values and the contains / # does not contain test. $CName = new ControlledName($Condition["Value"]); $SafeValue = defaulthtmlentities($CName->Name()); if ($Condition["Operator"] == "==") { $SafeOperator = "contains"; } elseif ($Condition["Operator"] == "!=") { $SafeOperator = "does not contain"; } } elseif ($Field->Type() == MetadataSchema::MDFTYPE_FLAG) { # friendly names for flag values $SafeValue = ($Condition["Value"] == 1) ? "true" : "false"; } else { # otherwise display the literal value $SafeValue = defaulthtmlentities($Condition["Value"]); } } catch (Exception $e) { # handle invalid (or deleted) fields $SafeName = "INVALID FIELD"; $SafeValue = defaulthtmlentities($Condition["Value"]); } # append friendly description to our list $Elements [] = $SafeName." ".$SafeOperator." ".$SafeValue; } # foreach subset foreach ($Subsets as $Subset) { # for subgroups, wrap a div around a recursive call to ourself $Elements [] = "(
". getPrivilegeDescriptionHtml($Subset). "
)"; } # glue together all the elements we collected with our logic return implode(" ".$Logic."
", $Elements); } # ----- MAIN ----------------------------------------------------------------- $SafeSchemaId = defaulthtmlentities($H_Schema->Id()); $SafeId = defaulthtmlentities($H_FieldData["Id"]); $SafeName = defaulthtmlentities($H_FieldData["Name"]); $SafeMappedName = defaulthtmlentities($H_FieldData["MappedName"]); $SafeTypeAsName = defaulthtmlentities($H_FieldData["TypeAsName"]); $SafeOwner = defaulthtmlentities($H_FieldData["Owner"]); ?>

(required fields are circled)

Export Field
1) { ?>

Please Note: This field is currently designated the Resource Field. Some field attributes cannot be modified and the field cannot be deleted until another metadata field is selected for Resource Field. HasPriv(PRIV_SYSADMIN)) { ?> This can be changed using the Edit Metadata Schema page. This field was created by the core software. Some field attributes cannot be modified and the field cannot be deleted. This field was created by the plugin. Some field attributes cannot be modified and the field cannot be deleted. This field cannot be deleted because at least one enabled tree field must exist to provide resource browsing functionality.To delete this field, create a new tree field or enable one that is currently disabled. This field cannot be deleted because it is currently in use by the privileges system.

Basic Information Applies To
Qualifiers Applies To
For Dublin Core compliant schemas, Qualifiers are equivalent to DC Encoding Schemes.
Resource Editing Applies To
OAI Applies To
Type-Specific Information Applies To
Privileges Applies To