Changeset View
Changeset View
Standalone View
Standalone View
src/applications/config/type/PhabricatorTextConfigType.php
<?php | <?php | ||||
abstract class PhabricatorTextConfigType | abstract class PhabricatorTextConfigType | ||||
extends PhabricatorConfigType { | extends PhabricatorConfigType { | ||||
public function isValuePresentInRequest( | public function isValuePresentInRequest( | ||||
PhabricatorConfigOption $option, | PhabricatorConfigOption $option, | ||||
AphrontRequest $request) { | AphrontRequest $request) { | ||||
$value = parent::readValueFromRequest($option, $request); | $value = parent::readValueFromRequest($option, $request); | ||||
return (bool)strlen($value); | return (bool)strlen($value); | ||||
} | } | ||||
protected function newCanonicalValue( | |||||
PhabricatorConfigOption $option, | |||||
$value) { | |||||
return (string)$value; | |||||
} | |||||
protected function newHTTPParameterType() { | protected function newHTTPParameterType() { | ||||
return new AphrontStringHTTPParameterType(); | return new AphrontStringHTTPParameterType(); | ||||
} | } | ||||
protected function newControl(PhabricatorConfigOption $option) { | protected function newControl(PhabricatorConfigOption $option) { | ||||
return new AphrontFormTextControl(); | return new AphrontFormTextControl(); | ||||
} | } | ||||
} | } |