21 $xml =
"\n<LinkLibraryMap>";
24 $xml .=
"</LinkLibraryMap>";
29 function import($doc,
$tx)
50 Settings::setDefaultValue(
"link_library",
"display_format",
"Paged List", String,
"Specify the format used to display link libraries.",
"",
"Paged List\nTabular");
55 $tabs = array(
"Library Details" =>
"/admin/link_library_form",
56 "Links" =>
"/admin/link_library_links");
58 $qs = ($key) ?
"link_library_id=$key" :
"";
59 return new TabBar(
"tabs",
$tabs,
$qs);
65 $form->hide(
"owner_id",
"create_date");
66 $form->required(
"name",
"identifier");
67 $form->allowDelete =
true;
79 trace(
"Deleting Link Library {$library->link_library_id}", 3);
81 $tx =
new DataTransaction();
89 $link->delete(
"WHERE link_library_id={$library->link_library_id}");
106 $mgr->upgrade($version);
121 trace(
"Component link_library is deleting objects dependent on user_id {$user_id}", 3);
123 $tx =
new DataTransaction();
141 $record->joinTransaction(
$tx);
142 $record->delete(
"WHERE owner_id={$user_id}");
180 if (!checkRole(
$page->role))
186 echo $pageView->drawView();
190 catch(DataNotFoundException $e)
200 trace(
"LinkLibraryManager registerSearchables", 3);
201 $searchables[
"link_library"] = array(
LinkRecord);
224 return $link->format(
"<h4>{title}</h4><p>{description}</p><img style='display:inline-block;vertical-align: middle' src='$icon' alt='$type'/> <a href='{url}' target='_blank'>Read More</a>");
if(! $document_library_id) $library
static findByIdentifier($identifier, $constraint="")
ComponentPageView generates the page content for a component page, substituting page fields,...
static findByIdentifier($identifier)
Provides a central management class for event handlers and common functionality for the link_library ...
static upgradeComponent($version)
static registerTaxonomyClasses($classes)
static displayLibrary($identifier, &$continue)
static registerSerializationHandler()
static deleteLinkLibrary($library)
static enumerateItems($items)
Enumerate the Document objects.
static deleteUser($user)
Respond to fired event DeleteUser.
static registerSearchables($searchables)
static buildLinkLibraryForm($library)
Serialization handler for Link Libraries and Link Records.
This class maps the publication table.
static storeRedirectPage()
Store the page from which a user has been redirected when prompted to login or create an account.
static serialize($class, $constraint="")
Serializes the specified DataItems to XML.
registerHandler($component, $title, $handler)
Registers a serialization handler for a component.
static unserialize($class, $doc, $tx, $save=true)
Instantiates DataItems from the supplied XML document and stores them in the database.
static setDefaultValue($component, $name, $value, $field_type="String", $annotation="", $category="", $options="", $weight=0)
Sets the default value of the given component setting.
static getRolesArray()
Retrieves the array of roles and their names for the current site for use in a CMS form.