-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathFieldtypePageTableNext.module
More file actions
56 lines (46 loc) · 1.25 KB
/
FieldtypePageTableNext.module
File metadata and controls
56 lines (46 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
/**
* COPYRIGHT NOTICE
* Copyright (c) 2025 Neue Rituale GbR
* @author NR <code@neuerituale.com>
* @license MIT
*/
namespace ProcessWire;
class FieldtypePageTableNext extends FieldtypePageTable {
public static function getModuleInfo() {
return array(
'title' => __('PageTable Next (Field)'),
'summary' => __('PageTable with encapsulated admin preview'),
'version' => 205,
'requires' => ['PageTableNext'],
'installs' => ['PageTableNext'],
'autoload' => false,
);
}
/**
* Get the Inputfield used for input by PageTableExtended
*
* @param Page $page
* @param Field $field
* @return InputfieldPageTableNext
*
* @throws WirePermissionException
*/
public function getInputfield(Page $page, Field $field) {
/** @var InputfieldPageTableNext $inputfield */
$inputfield = $this->modules->get('InputfieldPageTableNext');
$inputfield->attr('value', $page->getUnformatted($field->name));
return $inputfield;
}
/**
* Config fields
* @param Field $field
* @return InputfieldWrapper
*/
public function ___getConfigInputfields(Field $field) {
$inputfields = parent::___getConfigInputfields($field);
// remove sortfields field from pageTableConfig
$inputfields->remove('sortfields');
return $inputfields;
}
}