DocumentItem
abstract class DocumentItem
An abstract class for content-first documents Each instance provides content-first functionality one specific DocumentModel
Properties
Controller | $mod | ||
protected string | $model_name |
Methods
Returns true if this cf type allows copying documents to different instances.
Returns TRUE if the current user may create new documents
Copys a given document to another instance
Creates a new DocumentModel
Returns an i18n string describing the document type for which this content first library was created. The description should consist of approximately 30 words.
Returns a view for editing the document before it is finally created.
Returns the FontAwesome Class that can be used for items in the DMS
Returns the "location" a document is located at in its home instance.
Returns a fdl array containing specification on how to setup a location form element.
Returns a specific view for the given document
Returns an array of name=>title pairs of all views that are available for the current document.
Returns true if this cf type has the technical means of being copied to another instance.
Details
at line 164
bool
can_copy_to_another_instance()
Returns true if this cf type allows copying documents to different instances.
This does not reflect the technical means, but if the current user is allowed to perform the action
at line 80
bool
can_create_new()
Returns TRUE if the current user may create new documents
at line 185
protected DocumentModel
create_copy_document_in_instance(DocumentModel $document, string $instance_id, int $global_group_security_id = 0, $location = false)
Copys a given document to another instance
at line 43
DocumentModel
create_new(string $name)
Creates a new DocumentModel
at line 154
CommentsController
get_comments_instance(DocumentModel $document)
Returns the comments instance for a given document
at line 23
string
get_description()
Returns an i18n string describing the document type for which this content first library was created. The description should consist of approximately 30 words.
at line 145
abstract mixed
get_draft_view(DocumentModel $document)
Returns a view for editing the document before it is finally created.
Often it is the edit view provided by DocumentItem::get_view()
at line 114
string
get_icon_class(DocumentModel $document = false)
Returns the FontAwesome Class that can be used for items in the DMS
at line 92
string
get_location(DocumentModel $document)
Returns the "location" a document is located at in its home instance.
This could be the category, the contact type or something else, depending on the document type in question. It may be implemented as it seams convinient.
at line 105
mixed
get_location_form_element(DocumentModel $document = null)
Returns a fdl array containing specification on how to setup a location form element.
If an implementation returns something other than false, the "create_new" form will be equipped with an element created by using the returned fdl specification. The element will ALWAYS be optional
at line 135
abstract UIAjaxComponent
get_view(string $view_name, DocumentModel $document, bool $readonly = false)
Returns a specific view for the given document
at line 125
abstract array
get_views(DocumentModel $document)
Returns an array of name=>title pairs of all views that are available for the current document.
Use realtime evaluation of the document only if necessary!
at line 173
bool
supports_copy_to_another_instance()
Returns true if this cf type has the technical means of being copied to another instance.