3) { Deprecation::notice('3.0', 'Use setMaxLength() instead of constructor arguments', Deprecation::SCOPE_GLOBAL); } parent::__construct($name, $title, $value); } public function getAttributes() { $attributes = array_merge( parent::getAttributes(), array('type' => 'password') ); $autocomplete = Config::inst()->get('PasswordField', 'autocomplete'); if (isset($autocomplete)) { $attributes['autocomplete'] = $autocomplete ? 'on' : 'off'; } return $attributes; } /** * Makes a pretty readonly field with some stars in it */ public function performReadonlyTransformation() { $field = $this->castedCopy('ReadonlyField'); $field->setValue('*****'); return $field; } public function Type() { return 'text password'; } }