_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('' => 'DAY') + $dayMultiOptions; $monthMultiOptions = array('' => 'MONTH') + $monthMultiOptions; $yearMultiOptions = array('' => '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 ) : ''); } }