_translate(date('F', mktime(null, null, null, $i, 01))); } $startYear = date('Y'); if (isset($attributes['startYear'])) { $startYear = $attributes['startYear']; unset($attributes['startYear']); } $yearsInterval = $this->_yearsInterval; if (isset($attributes['yearsInterval'])) { $yearsInterval = $attributes['yearsInterval']; unset($attributes['yearsInterval']); } $stopYear = $startYear + $yearsInterval; if (isset($attributes['stopYear'])) { $stopYear = $attributes['stopYear']; unset($attributes['stopYear']); } if ($stopYear < $startYear) { for ($i = $startYear; $i >= $stopYear; $i--) { $yearMultiOptions[$i] = $i; } } else { for ($i = $startYear; $i <= $stopYear; $i++) { $yearMultiOptions[$i] = $i; } } if (isset($attributes['order']) && $attributes['order'] == 'DESC') { $yearMultiOptions = array_reverse($yearMultiOptions, true); } if (empty($attributes['disableDefaultItem']) || !$attributes['disableDefaultItem']) { $dayMultiOptions = array('' => $this->_translate('Day')) + $dayMultiOptions; $monthMultiOptions = array('' => $this->_translate('Month')) + $monthMultiOptions; $yearMultiOptions = array('' => $this->_translate('Year')) + $yearMultiOptions; } /** @var Zend_View_Helper_FormSelect $formSelectView */ $formSelectView = $this->view; return (!isset($attributes['showDay']) || $attributes['showDay'] ? $formSelectView->formSelect( $name . '[day]', $day, $dayAttribute, $dayMultiOptions ) : '') . (!isset ($attributes['showMonth']) || $attributes['showMonth'] ? $formSelectView->formSelect( $name . '[month]', $month, $monthAttribute, $monthMultiOptions ) : '') . (!isset ($attributes['showYear']) || $attributes['showYear'] ? $formSelectView->formSelect( $name . '[year]', $year, $yearAttribute, $yearMultiOptions ) : ''); } protected function _translate($text) { return Qs_Translate::translate($text); } }