1 <?php
2 3 4 5 6 7 8
9
10 defined('JPATH_PLATFORM') or die;
11
12 JFormHelper::loadFieldClass('predefinedlist');
13
14 15 16 17 18
19 class JFormFieldLastvisitDateRange extends JFormFieldPredefinedList
20 {
21 22 23 24 25 26 27
28 public function __construct($form = null)
29 {
30 parent::__construct($form);
31
32
33 $this->type = 'LastvisitDateRange';
34
35
36 $lang = JFactory::getLanguage();
37 $lang->load('com_users', JPATH_ADMINISTRATOR);
38
39
40 $this->predefinedOptions = array(
41 'today' => 'COM_USERS_OPTION_RANGE_TODAY',
42 'past_week' => 'COM_USERS_OPTION_RANGE_PAST_WEEK',
43 'past_1month' => 'COM_USERS_OPTION_RANGE_PAST_1MONTH',
44 'past_3month' => 'COM_USERS_OPTION_RANGE_PAST_3MONTH',
45 'past_6month' => 'COM_USERS_OPTION_RANGE_PAST_6MONTH',
46 'past_year' => 'COM_USERS_OPTION_RANGE_PAST_YEAR',
47 'post_year' => 'COM_USERS_OPTION_RANGE_POST_YEAR',
48 'never' => 'COM_USERS_OPTION_RANGE_NEVER',
49 );
50 }
51 }
52