public function __construct($name = null, $options = array())
 {
     parent::__construct($name, $options);
     $this->setHydrator(new ClassMethods(false));
     $this->setObject(new Post());
     $this->add(array('type' => 'hidden', 'name' => 'id'));
     $this->add(array('type' => 'text', 'name' => 'text', 'options' => array('label' => 'Blog text')));
     $this->add(array('type' => 'text', 'name' => 'title', 'options' => array('label' => 'Blog Title')));
 }
 public function __construct($items = null)
 {
     parent::__construct();
     if (CalendarDateTime::dmy()) {
         $firstName = "Day";
         $firstFunc = "getDaysMap";
         $secondName = "Month";
         $secondFunc = "getMonthsMap";
     } else {
         $firstName = "Month";
         $firstFunc = "getMonthsMap";
         $secondName = "Day";
         $secondFunc = "getDaysMap";
     }
     $this->addFilterField(new FieldGroup(new DropdownField('Start' . $firstName, _t('CalendarFilterFieldSet.START', 'Start'), CalendarUtil::$firstFunc()), new DropdownField('Start' . $secondName, '', CalendarUtil::$secondFunc()), new DropdownField('StartYear', '', CalendarUtil::getYearsMap())));
     $this->addFilterField(new FieldGroup(new DropdownField('End' . $firstName, _t('CalendarFilterFieldSet.END', 'End'), CalendarUtil::$firstFunc()), new DropdownField('End' . $secondName, '', CalendarUtil::$secondFunc()), new DropdownField('EndYear', '', CalendarUtil::getYearsMap())));
 }