Completed
Push — master ( 416cb1...222de5 )
by Anton
03:44
created

Page::define()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 22
Code Lines 15

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 22
rs 9.2
cc 1
eloc 15
nc 1
nop 0
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->addInteger       ('parent_id',       false, 10, 0, true, false);
18
			$this->addInteger       ('visibility',      true, 1, VISIBILITY_DRAFT, true, false);
19
			$this->addInteger       ('access',          true, 1, ACCESS_PUBLIC, true, false);
20
			$this->addTextual       ('hash',            true, 40, true, true, true);
21
			$this->addTextual       ('name',            true, 255, false, true, false);
22
			$this->addTextual       ('title',           true, 255, false, true, false);
23
			$this->addTextual       ('contents',        false, 0, false, false, false);
24
			$this->addTextual       ('description',     false, 0, false, false, false);
25
			$this->addTextual       ('keywords',        false, 0, false, false, false);
26
			$this->addBoolean       ('robots_index',    true, false);
27
			$this->addBoolean       ('robots_follow',   true, false);
28
			$this->addInteger       ('time_created',    false, 10, 0, true, false);
29
			$this->addInteger       ('time_modified',   false, 10, 0, true, false);
30
31
			# Add orderers
32
33
			$this->addOrderer       ('title');
34
		}
35
	}
36
}
37