1 | <?php |
||
12 | class AnchorSelectorField extends TextField |
||
13 | { |
||
14 | protected $schemaComponent = 'AnchorSelectorField'; |
||
15 | |||
16 | private static $allowed_actions = [ |
||
|
|||
17 | 'anchors', |
||
18 | ]; |
||
19 | |||
20 | private static $url_handlers = [ |
||
21 | 'anchors/$PageID' => 'anchors', |
||
22 | ]; |
||
23 | |||
24 | public function getSchemaDataDefaults() |
||
30 | |||
31 | /** |
||
32 | * Find all anchors available on the given page. |
||
33 | * |
||
34 | * @param HTTPRequest $request |
||
35 | * @return array |
||
36 | */ |
||
37 | public function anchors(HTTPRequest $request) |
||
43 | |||
44 | /** |
||
45 | * Get anchors in the given page ID |
||
46 | * |
||
47 | * @param int $id |
||
48 | * @return array |
||
49 | */ |
||
50 | protected function getAnchorsInPage($id) |
||
71 | } |
||
72 |