sanitizer->entities($tabOpen->label) . "' " .
@@ -1126,7 +1127,7 @@ class ProcessPageEdit extends Process implements WirePageEditor, ConfigurableMod
protected function ___buildFormChildren() {
$page = $this->masterPage ? $this->masterPage : $this->page;
- $wrapper = $this->wire(new InputfieldWrapper());
+ $wrapper = $this->wire(new InputfieldWrapper()); /** @var InputfieldWrapper $wrapper */
$id = $this->className() . 'Children';
$wrapper->attr('id+name', $id);
if(!empty($this->configSettings['ajaxChildren'])) $wrapper->collapsed = Inputfield::collapsedYesAjax;
@@ -1202,10 +1203,14 @@ class ProcessPageEdit extends Process implements WirePageEditor, ConfigurableMod
*/
public static function buildFormSortfield($sortfield, Process $caller) {
- $fieldset = $caller->wire('modules')->get("InputfieldFieldset");
+ $modules = $caller->wire()->modules;
+
+ /** @var InputfieldFieldset $fieldset */
+ $fieldset = $modules->get("InputfieldFieldset");
if(!$sortfield) $fieldset->collapsed = Inputfield::collapsedYes;
- $field = $caller->wire('modules')->get('InputfieldSelect');
+ /** @var InputfieldSelect $field */
+ $field = $modules->get('InputfieldSelect');
$field->name = 'sortfield';
$field->value = ltrim($sortfield, '-');
$field->columnWidth = 60;
@@ -1222,7 +1227,7 @@ class ProcessPageEdit extends Process implements WirePageEditor, ConfigurableMod
'modified' => 'modified',
'created' => 'created',
'published' => 'published',
- );
+ );
$field->addOption(__('Native Fields', __FILE__), $options); // Optgroup label for sorting by fields native to ProcessWire
@@ -1241,7 +1246,8 @@ class ProcessPageEdit extends Process implements WirePageEditor, ConfigurableMod
$field->addOption(__('Custom Fields', __FILE__), $customOptions); // Optgroup label for sorting by custom fields
$fieldset->append($field);
- $f = $caller->wire('modules')->get('InputfieldCheckbox');
+ /** @var InputfieldCheckbox $f */
+ $f = $modules->get('InputfieldCheckbox');
$f->value = 1;
$f->attr('id+name', 'sortfield_reverse');
$f->label = __('Reverse sort direction?', __FILE__); // Checkbox labe to reverse the sort direction
@@ -1251,6 +1257,7 @@ class ProcessPageEdit extends Process implements WirePageEditor, ConfigurableMod
$f->columnWidth = 40;
$fieldset->append($f);
+
return $fieldset;
}
@@ -1444,6 +1451,7 @@ class ProcessPageEdit extends Process implements WirePageEditor, ConfigurableMod
$f->parent_id = $this->config->usersPageID;
$f->showPath = false;
} else {
+ /** @var InputfieldInteger $f */
$f = $modules->get('InputfieldInteger');
$f->description = $this->_('Enter the created user’s ID.');
$f->notes = "{$this->page->created_users_id} = {$this->page->createdUser->name}";
@@ -1527,6 +1535,7 @@ class ProcessPageEdit extends Process implements WirePageEditor, ConfigurableMod
$modules = $this->modules;
$sanitizer = $this->sanitizer;
$languages = $this->wire()->languages;
+ $pages = $this->wire()->pages;
if($this->isPost && $input->post('_prevpath_add') === null) return null;
if(!$modules->isInstalled('PagePathHistory')) return null;
@@ -1601,7 +1610,7 @@ class ProcessPageEdit extends Process implements WirePageEditor, ConfigurableMod
$table->headerRow($header);
- foreach($data as $n => $item) {
+ foreach($data as /*$n =>*/ $item) {
$id = md5($item['path'] . $item['date']);
$path = $item['path'];
@@ -1638,7 +1647,7 @@ class ProcessPageEdit extends Process implements WirePageEditor, ConfigurableMod
$row[] = "" . $delete->render() . "
";
} else {
$parentLabel = $this->_x('Parent', 'prev-path-parent');
- $parent = $this->wire('pages')->get((int) $item['virtual']);
+ $parent = $pages->get((int) $item['virtual']);
if($parent->id) $parentLabel = "