1<?php
2
3
4namespace ComboStrap;
5
6use ComboStrap\Meta\Api\Metadata;
7use ComboStrap\Meta\Api\MetadataWikiPath;
8
9/**
10 * Class Reference
11 * @package ComboStrap
12 * Reference
13 *
14 * Because they may not exist and this data is derive, we store only the value
15 * and not the page id for instance
16 */
17class Reference extends MetadataWikiPath
18{
19
20
21    public static function createFromResource(MarkupPath $page)
22    {
23        return (new Reference())
24            ->setResource($page);
25    }
26
27    static public function getDescription(): string
28    {
29        return "The path to the internal page";
30    }
31
32    static public function getLabel(): string
33    {
34        return "Reference Path";
35    }
36
37    public static function getName(): string
38    {
39        return "reference";
40    }
41
42    static public function getPersistenceType(): string
43    {
44        return Metadata::DERIVED_METADATA;
45    }
46
47    static public function isMutable(): bool
48    {
49        return false;
50    }
51
52    static public function getDrive(): string
53    {
54        return WikiPath::MARKUP_DRIVE;
55    }
56
57}
58