_defaults['status'] = Entity::STATUS_ACTIVE; $this->_defaults['joinDate'] = date('Y-m-d');; return parent::init(); } protected function _initElements() { parent::_initElements(); $this->getElement('password')->setRequired(); $this->getElement('confirmPassword')->setRequired(); return $this; } }