1<?php
2
3
4use ComboStrap\MetaManagerForm;
5use ComboStrap\Metadata;
6use ComboStrap\MetadataDateTime;
7use ComboStrap\Page;
8
9/**
10 * Class ReplicationDate
11 * Modification date of the database row
12 */
13class ReplicationDate extends MetadataDateTime
14{
15
16    /**
17     * The attribute in the metadata and in the database
18     */
19    public const PROPERTY_NAME = "date_replication";
20    public const REPLICATION_CANONICAL = "replication";
21
22    public static function createFromPage(Page $page)
23    {
24        return (new ReplicationDate())
25            ->setResource($page);
26    }
27
28    public function getTab(): string
29    {
30        return MetaManagerForm::TAB_INTEGRATION_VALUE;
31    }
32
33    public function getDescription(): string
34    {
35        return "The modification date of the database row";
36    }
37
38    public function getLabel(): string
39    {
40        return "Database Replication Date";
41    }
42
43    public function getCanonical(): string
44    {
45        return self::REPLICATION_CANONICAL;
46    }
47
48    static public function getName(): string
49    {
50        return self::PROPERTY_NAME;
51    }
52
53    public function getPersistenceType(): string
54    {
55        return Metadata::RUNTIME_METADATA;
56    }
57
58    public function getMutable(): bool
59    {
60        return false;
61    }
62
63    public function getDefaultValue()
64    {
65        return null;
66    }
67}
68