/** * @return array */ public function toOptionArray() { $timezones = $this->_localeLists->getOptionTimezones(); $timezones = array_filter($timezones, function ($value) { if (in_array($value['value'], $this->ignoredTimezones)) { return false; } return true; }); return $timezones; }
/** * Retrieve available timezone codes * * @return array */ public function getAvailableTimezones() { return $this->_localeLists->getOptionTimezones(); }
/** * @return array */ public function toOptionArray() { return $this->_localeLists->getOptionTimezones(); }
/** * Retrieve timezone dropdown HTML * * @return string */ public function getTimezoneSelect() { $html = $this->getLayout()->createBlock('Magento\\Framework\\View\\Element\\Html\\Select')->setName('config[timezone]')->setId('timezone')->setTitle(__('Time Zone'))->setClass('required-entry')->setValue($this->getTimezone())->setOptions($this->_localeLists->getOptionTimezones())->getHtml(); return $html; }