mirror of
https://github.com/silverstripe/silverstripe-dms
synced 2024-10-22 14:05:56 +02:00
ENHANCEMENT: adding document type one to many relation to specific EA extension of the DMS
This commit is contained in:
parent
ac826784f1
commit
51f477a88c
@ -2,8 +2,10 @@
|
||||
class DMSDocument extends DataObject implements DMSDocumentInterface {
|
||||
|
||||
static $db = array(
|
||||
"Filename" => "Text",
|
||||
"Folder" => "Text"
|
||||
"Filename" => "Varchar(255)",
|
||||
"Folder" => "Varchar(255)",
|
||||
"Title" => 'Varchar(1024)',
|
||||
"Description" => 'Text',
|
||||
);
|
||||
|
||||
static $many_many = array(
|
||||
@ -46,6 +48,7 @@ class DMSDocument extends DataObject implements DMSDocumentInterface {
|
||||
$this->Pages()->removeAll();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Adds a metadata tag to the Document. The tag has a category and a value.
|
||||
* Each category can have multiple values by default. So: addTag("fruit","banana") addTag("fruit", "apple") will add two items.
|
||||
|
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
class DocumentType extends DataObject {
|
||||
static $db = array(
|
||||
'Name' => 'Varchar(255)'
|
||||
);
|
||||
|
||||
static $has_many = array(
|
||||
'Documents' => 'EADocument'
|
||||
);
|
||||
}
|
Loading…
Reference in New Issue
Block a user