-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdescriptor.php
More file actions
executable file
·50 lines (35 loc) · 948 Bytes
/
descriptor.php
File metadata and controls
executable file
·50 lines (35 loc) · 948 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
namespace Icybee\Modules\Contents;
use ICanBoogie\ActiveRecord\Model;
use ICanBoogie\Module\Descriptor;
return [
Descriptor::ID => 'contents',
Descriptor::CATEGORY => 'contents',
Descriptor::DESCRIPTION => "Base module for content nodes such as articles or news.",
Descriptor::INHERITS => 'nodes',
Descriptor::MODELS => [
'primary' => [
Model::EXTENDING => 'nodes',
Model::SCHEMA => [
'subtitle' => 'varchar',
'body' => 'text',
'excerpt' => 'text',
'date'=> 'datetime',
'editor' => [ 'varchar', 32 ],
'is_home_excluded' => [ 'boolean', 'indexed' => true ]
]
],
'rendered' => [
Model::CLASSNAME => Model::class,
Model::CONNECTION => 'local',
Model::SCHEMA => [
'nid' => [ 'foreign', 'primary' => true ],
'updated_at' => 'datetime',
'body' => 'text'
]
]
],
Descriptor::NS => __NAMESPACE__,
Descriptor::REQUIRED => true,
Descriptor::TITLE => "Contents"
];