<?php
 namespace ModStart\Field; class SwitchField extends AbstractField { protected $width = 60; protected function setup() { $this->addVariables([ 'options' => [ 1 => L('On'), 0 => L('Off'), ], ]); } public function optionsOnOff() { $this->addVariables(['options' => [ 1 => L('On'), 0 => L('Off'), ]]); return $this; } public function optionsYesNo() { $this->addVariables(['options' => [ 1 => L('Yes'), 0 => L('No'), ]]); return $this; } }