Completed
Branch 0.3.0 (b16461)
by Anton
04:03
created

Page   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 1
cbo 4
dl 0
loc 35
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
B define() 0 28 1
1
<?php
2
3
namespace Modules\Entitizer\Definition {
4
5
	use Modules\Entitizer;
6
7
	class Page extends Entitizer\Utils\Definition {
8
9
		use Entitizer\Common\Page;
10
11
		# Define presets
12
13
		protected function define() {
14
15
			# Add params
16
17
			$this->params->integer      ('visibility',          true, 1, true, VISIBILITY_DRAFT);
18
			$this->params->integer      ('access',              true, 1, true, ACCESS_PUBLIC);
19
			$this->params->boolean      ('locked',              true);
20
			$this->params->textual      ('slug',                true, 255, false, '');
21
			$this->params->textual      ('name',                true, 255, false, '');
22
			$this->params->textual      ('title',               true, 255, false, '');
23
			$this->params->textual      ('contents',            false, 0, false, '');
24
			$this->params->textual      ('description',         false, 0, false, '');
25
			$this->params->textual      ('keywords',            false, 0, false, '');
26
			$this->params->boolean      ('robots_index',        false);
27
			$this->params->boolean      ('robots_follow',       false);
28
			$this->params->integer      ('time_created',        false, 10, true, 0);
29
			$this->params->integer      ('time_modified',       false, 10, true, 0);
30
31
			# Add indexes
32
33
			$this->indexes->add         ('visibility');
34
			$this->indexes->add         ('access');
35
			$this->indexes->add         ('slug');
36
			$this->indexes->add         ('name');
37
			$this->indexes->add         ('title');
38
			$this->indexes->add         ('time_created');
39
			$this->indexes->add         ('time_modified');
40
		}
41
	}
42
}
43