Page MenuHomeWickedGov Phorge

GlobalPreferencesFormOOUI.php
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

GlobalPreferencesFormOOUI.php

<?php
namespace GlobalPreferences;
use PreferencesFormOOUI;
/**
* The GlobalPreferencesForm changes the display format, and adds section headers linking back to
* the local-preferences form.
*
* @package GlobalPreferences
*/
class GlobalPreferencesFormOOUI extends PreferencesFormOOUI {
/**
* Get the whole body of the form, adding the global preferences header text to the top of each
* section. JavaScript will later add the 'select all' checkbox to this header.
* @return string
*/
public function getBody() {
// Add checkbox to the top of every section.
foreach ( $this->getPreferenceSections() as $section ) {
$colHeaderText = $this->getMessage( 'globalprefs-col-header' )->text();
$secHeader = new \OOUI\FieldLayout(
new \OOUI\CheckboxInputWidget( [
'infusable' => true,
'classes' => [ 'globalprefs-section-select-all' ],
] ),
[
'align' => 'inline',
'label' => $colHeaderText,
'classes' => [ 'globalprefs-section-header' ],
]
);
$this->addHeaderHtml( $secHeader, $section );
}
return parent::getBody();
}
}

File Metadata

Mime Type
text/x-php
Expires
Sun, Oct 4, 00:51 (3 w, 2 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
91/18/eee2bfe5aadf213f7cfb94b6cea1
Default Alt Text
GlobalPreferencesFormOOUI.php (1 KB)

Event Timeline