MNT Update docblocks and import statements (#1044)

This commit is contained in:
Chris Penny 2021-02-26 16:13:23 +13:00 committed by GitHub
parent 75fe398be5
commit 72a213790e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
29 changed files with 113 additions and 46 deletions

View File

@ -13,6 +13,7 @@ use SilverStripe\Forms\GridField\GridFieldDeleteAction;
use SilverStripe\Forms\GridField\GridFieldDetailForm;
use SilverStripe\Forms\GridField\GridFieldToolbarHeader;
use SilverStripe\ORM\DataExtension;
use SilverStripe\ORM\DataList;
use SilverStripe\UserForms\Form\GridFieldAddClassesButton;
use SilverStripe\UserForms\Model\EditableFormField;
use SilverStripe\UserForms\Model\EditableFormField\EditableFieldGroup;

View File

@ -13,6 +13,7 @@ use SilverStripe\UserForms\Model\Submission\SubmittedFileField;
use SilverStripe\Versioned\Versioned;
/**
* @property string $UserFormUpload
* @method File SubmittedFileField
*/
class UserFormFileExtension extends DataExtension

View File

@ -15,12 +15,13 @@ use SilverStripe\Versioned\Versioned;
* A custom rule for showing / hiding an EditableFormField
* based the value of another EditableFormField.
*
* @property string $ConditionOption
* @property int $ConditionFieldID
* @property string $Display
* @property string $FieldValue
* @property int $ParentID
* @method EditableFormField Parent()
* @method EditableFormField ConditionField()
*
* @property string Display
* @property string ConditionOption
* @property string FieldValue
*/
class EditableCustomRule extends DataObject
{

View File

@ -24,11 +24,11 @@ use SilverStripe\Forms\SegmentField;
use SilverStripe\Forms\TabSet;
use SilverStripe\Forms\TextField;
use SilverStripe\ORM\ArrayList;
use SilverStripe\ORM\DataList;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\DB;
use SilverStripe\ORM\FieldType\DBField;
use SilverStripe\ORM\FieldType\DBVarchar;
use SilverStripe\ORM\HasManyList;
use SilverStripe\ORM\SS_List;
use SilverStripe\ORM\ValidationException;
use SilverStripe\UserForms\Extension\UserFormFieldEditorExtension;
@ -48,16 +48,20 @@ use Symbiote\GridFieldExtensions\GridFieldEditableColumns;
*
* @package userforms
*
* @property string $Name
* @property string $Title
* @property string $Default
* @property int $Sort
* @property bool $Required
* @property string $CustomErrorMessage
* @property boolean $ShowOnLoad
* @property string $Default
* @property string $DisplayRulesConjunction
* @property string $ExtraClass
* @property string $Name
* @property int $ParentID
* @property string $Placeholder
* @property string $RightTitle
* @property bool $Required
* @property int $ShowInSummary
* @property int $ShowOnLoad
* @property int $Sort
* @method UserDefinedForm Parent() Parent page
* @method DataList|EditableCustomRule[] DisplayRules() List of EditableCustomRule objects
* @method HasManyList|EditableCustomRule[] DisplayRules() List of EditableCustomRule objects
* @mixin Versioned
*/
class EditableFormField extends DataObject

View File

@ -3,6 +3,7 @@
namespace SilverStripe\UserForms\Model\EditableFormField;
use SilverStripe\Forms\CheckboxField;
use SilverStripe\Forms\FieldList;
use SilverStripe\UserForms\Model\EditableFormField;
/**
@ -11,8 +12,8 @@ use SilverStripe\UserForms\Model\EditableFormField;
* A user modifiable checkbox on a UserDefinedForm
*
* @package userforms
* @property int $CheckedDefault
*/
class EditableCheckbox extends EditableFormField
{
private static $singular_name = 'Checkbox Field';

View File

@ -12,7 +12,6 @@ use SilverStripe\UserForms\Model\EditableCustomRule;
*
* @package userforms
*/
class EditableCheckboxGroupField extends EditableMultipleOptionField
{
private static $singular_name = 'Checkbox Group';

View File

@ -13,10 +13,9 @@ use SilverStripe\UserForms\Model\EditableFormField;
/**
* A dropdown field which allows the user to select a country
*
* @package userforms
* @property bool $UseEmptyString
* @property string $EmptyString
*
* @package userforms
*/
class EditableCountryDropdownField extends EditableFormField
{

View File

@ -14,6 +14,7 @@ use SilverStripe\UserForms\Model\EditableFormField\EditableDateField\FormField;
* Allows a user to add a date field.
*
* @package userforms
* @property int $DefaultToToday
*/
class EditableDateField extends EditableFormField
{

View File

@ -4,6 +4,7 @@ namespace SilverStripe\UserForms\Model\EditableFormField;
use SilverStripe\Forms\CheckboxField;
use SilverStripe\Forms\DropdownField;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\TextField;
use SilverStripe\UserForms\Model\EditableCustomRule;
use SilverStripe\UserForms\Model\EditableFormField;
@ -13,10 +14,9 @@ use SilverStripe\UserForms\Model\EditableFormField;
*
* Represents a modifiable dropdown (select) box on a form
*
* @package userforms
* @property bool $UseEmptyString
* @property string $EmptyString
*
* @package userforms
*/
class EditableDropdown extends EditableMultipleOptionField
{

View File

@ -3,6 +3,7 @@
namespace SilverStripe\UserForms\Model\EditableFormField;
use SilverStripe\Forms\EmailField;
use SilverStripe\Forms\FormField;
use SilverStripe\UserForms\Model\EditableFormField;
/**
@ -12,7 +13,6 @@ use SilverStripe\UserForms\Model\EditableFormField;
*
* @package userforms
*/
class EditableEmailField extends EditableFormField
{
private static $singular_name = 'Email Field';

View File

@ -9,6 +9,9 @@ use SilverStripe\UserForms\Model\EditableFormField;
/**
* Specifies that this ends a group of fields
*
* @property int $EditableFieldGroupEndID
* @method EditableFieldGroupEnd EditableFieldGroupEnd()
*/
class EditableFieldGroup extends EditableFormField
{
@ -35,7 +38,7 @@ class EditableFieldGroup extends EditableFormField
/**
* Non-data field type
*
* @var type
* @var bool
*/
private static $literal = true;

View File

@ -6,10 +6,11 @@ use SilverStripe\Forms\HiddenField;
use SilverStripe\Forms\LabelField;
use SilverStripe\Security\Group;
use SilverStripe\UserForms\Model\EditableFormField;
use SilverStripe\UserForms\Model\EditableFormField\EditableFieldGroup;
/**
* Specifies that this ends a group of fields
*
* @method EditableFieldGroup Group()
*/
class EditableFieldGroupEnd extends EditableFormField
{

View File

@ -24,11 +24,11 @@ use SilverStripe\UserForms\Model\Submission\SubmittedFileField;
/**
* Allows a user to add a field that can be used to upload a file.
*
* @method Folder Folder
* @property int FolderID
* @property boolean MaxFileSizeMB
* @property boolean FolderConfirmed
* @package userforms
* @property int $FolderConfirmed
* @property int $FolderID
* @property float $MaxFileSizeMB
* @method Folder Folder
*/
class EditableFileField extends EditableFormField
{

View File

@ -2,9 +2,9 @@
namespace SilverStripe\UserForms\Model\EditableFormField;
use SilverStripe\Core\Convert;
use SilverStripe\Forms\CheckboxField;
use SilverStripe\Forms\DropdownField;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\HeaderField;
use SilverStripe\UserForms\Model\EditableFormField;
@ -12,6 +12,8 @@ use SilverStripe\UserForms\Model\EditableFormField;
* Allows an editor to insert a generic heading into a field
*
* @package userforms
* @property int $Level
* @property int $HideFromReports
*/
class EditableFormHeading extends EditableFormField
{

View File

@ -2,6 +2,8 @@
namespace SilverStripe\UserForms\Model\EditableFormField;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\FormField;
use SilverStripe\Forms\LabelField;
use SilverStripe\UserForms\FormField\UserFormsStepField;
use SilverStripe\UserForms\Model\EditableFormField;
@ -48,6 +50,7 @@ class EditableFormStep extends EditableFormField
->setName($this->Name)
->setTitle($this->Title);
$this->doUpdateFormField($field);
return $field;
}

View File

@ -3,6 +3,7 @@
namespace SilverStripe\UserForms\Model\EditableFormField;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\HTMLEditor\HTMLEditorConfig;
use SilverStripe\Forms\HTMLEditor\HTMLEditorField;
use SilverStripe\Forms\HTMLEditor\HTMLEditorSanitiser;
@ -16,6 +17,9 @@ use SilverStripe\UserForms\Model\EditableFormField;
* you can add your own HTML / Images / Flash
*
* @package userforms
* @property string $Content
* @property int $HideFromReports
* @property int $HideLabel
*/
class EditableLiteralField extends EditableFormField
{

View File

@ -3,6 +3,7 @@
namespace SilverStripe\UserForms\Model\EditableFormField;
use SilverStripe\Forms\DropdownField;
use SilverStripe\Forms\FieldList;
use SilverStripe\Security\Group;
use SilverStripe\Security\Member;
use SilverStripe\UserForms\Model\EditableFormField;
@ -11,6 +12,8 @@ use SilverStripe\UserForms\Model\EditableFormField;
* Creates an editable field that displays members in a given group
*
* @package userforms
* @property int $GroupID
* @method Group Group()
*/
class EditableMemberListField extends EditableFormField
{

View File

@ -3,16 +3,18 @@
namespace SilverStripe\UserForms\Model\EditableFormField;
use SilverStripe\Forms\CheckboxField;
use SilverStripe\Forms\TextField;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\GridField\GridField;
use SilverStripe\Forms\GridField\GridFieldButtonRow;
use SilverStripe\Forms\GridField\GridFieldConfig;
use SilverStripe\Forms\GridField\GridFieldDeleteAction;
use SilverStripe\Forms\GridField\GridFieldToolbarHeader;
use SilverStripe\Forms\Tab;
use SilverStripe\Forms\TextField;
use SilverStripe\ORM\HasManyList;
use SilverStripe\ORM\Map;
use SilverStripe\ORM\SS_List;
use SilverStripe\UserForms\Model\EditableFormField;
use SilverStripe\Versioned\Versioned;
use Symbiote\GridFieldExtensions\GridFieldAddNewInlineButton;
use Symbiote\GridFieldExtensions\GridFieldEditableColumns;
use Symbiote\GridFieldExtensions\GridFieldOrderableRows;
@ -29,8 +31,8 @@ use Symbiote\GridFieldExtensions\GridFieldTitleHeader;
* @see EditableDropdownField
*
* @package userforms
* @method HasManyList|EditableOption[] Options()
*/
class EditableMultipleOptionField extends EditableFormField
{
/**
@ -56,7 +58,7 @@ class EditableMultipleOptionField extends EditableFormField
private static $table_name = 'EditableMultipleOptionField';
/**
* @return \SilverStripe\Forms\FieldList
* @return FieldList
*/
public function getCMSFields()
{
@ -165,7 +167,7 @@ class EditableMultipleOptionField extends EditableFormField
/**
* Returns all default options
*
* @return \SilverStripe\ORM\SS_List
* @return SS_List
*/
protected function getDefaultOptions()
{

View File

@ -3,6 +3,7 @@
namespace SilverStripe\UserForms\Model\EditableFormField;
use SilverStripe\Forms\FieldGroup;
use SilverStripe\Forms\FormField;
use SilverStripe\Forms\LiteralField;
use SilverStripe\Forms\NumericField;
use SilverStripe\UserForms\Model\EditableFormField;
@ -13,8 +14,9 @@ use SilverStripe\UserForms\Model\EditableFormField;
* This control represents a user-defined numeric field in a user defined form
*
* @package userforms
* @property int $MaxValue
* @property int $MinValue
*/
class EditableNumericField extends EditableFormField
{

View File

@ -11,8 +11,14 @@ use SilverStripe\Versioned\Versioned;
* Base Class for EditableOption Fields such as the ones used in
* dropdown fields and in radio check box groups
*
* @method EditableMultipleOptionField Parent()
* @package userforms
* @property int $Default
* @property string $Name
* @property int $ParentID
* @property int $Sort
* @property string $Value
* @method EditableMultipleOptionField Parent()
* @mixin Versioned
*/
class EditableOption extends DataObject
{
@ -98,7 +104,6 @@ class EditableOption extends DataObject
/**
* @param Member $member
*
* @return boolean
*/
public function canEdit($member = null)
@ -107,7 +112,6 @@ class EditableOption extends DataObject
}
/**
* @param Member $member
*
* @return boolean
*/
public function canDelete($member = null)

View File

@ -2,6 +2,7 @@
namespace SilverStripe\UserForms\Model\EditableFormField;
use SilverStripe\Forms\FieldList;
use SilverStripe\UserForms\FormField\UserFormsOptionSetField;
use SilverStripe\UserForms\Model\EditableCustomRule;
@ -12,7 +13,6 @@ use SilverStripe\UserForms\Model\EditableCustomRule;
*
* @package userforms
*/
class EditableRadioField extends EditableMultipleOptionField
{
private static $singular_name = 'Radio Group';

View File

@ -19,8 +19,11 @@ use SilverStripe\UserForms\Model\EditableFormField;
* This control represents a user-defined text field in a user defined form
*
* @package userforms
* @property string $Autocomplete
* @property int $MaxLength
* @property int $MinLength
* @property int $Rows
*/
class EditableTextField extends EditableFormField
{
private static $singular_name = 'Text Field';

View File

@ -3,7 +3,7 @@
namespace SilverStripe\UserForms\Model\EditableFormField;
use SilverStripe\Forms\RequiredFields;
use SilverStripe\UserForms\Model\EditableCustomRule;
use SilverStripe\UserForms\Model\EditableFormField;
class Validator extends RequiredFields
{

View File

@ -30,6 +30,7 @@ use SilverStripe\ORM\DataList;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\DB;
use SilverStripe\ORM\FieldType\DBField;
use SilverStripe\ORM\HasManyList;
use SilverStripe\ORM\ValidationResult;
use SilverStripe\Security\Member;
use SilverStripe\UserForms\Model\EditableFormField;
@ -47,6 +48,25 @@ use Symbiote\GridFieldExtensions\GridFieldEditableColumns;
* to and custom subjects
*
* @package userforms
* @property string $CustomRulesCondition
* @property string $EmailAddress
* @property string $EmailBody
* @property string $EmailBodyHtml
* @property string $EmailFrom
* @property string $EmailReplyTo
* @property string $EmailSubject
* @property string $EmailTemplate
* @property int $FormID
* @property int $HideFromData
* @property int $SendPlain
* @property int $SendEmailFromFieldID
* @property int $SendEmailSubjectFieldID
* @property int $SendEmailToFieldID
* @method HasManyList|EmailRecipientCondition[] CustomRules()
* @method DataObject Form()
* @method EditableFormField SendEmailFromField()
* @method EditableFormField SendEmailSubjectField()
* @method EditableFormField SendEmailToField()
*/
class EmailRecipient extends DataObject
{

View File

@ -14,12 +14,12 @@ use SilverStripe\UserForms\Model\EditableFormField;
/**
* Declares a condition that determines whether an email can be sent to a given recipient
*
* @property int $ConditionFieldID
* @property string $ConditionOption
* @property string $ConditionValue
* @property int $ParentID
* @method EditableFormField ConditionField()
* @method EmailRecipient Parent()
*
* @property Enum ConditionOption
* @property Varchar ConditionValue
*
* @method EditableFormField ConditionField
*/
class EmailRecipientCondition extends DataObject
{

View File

@ -10,8 +10,9 @@ use SilverStripe\ORM\FieldType\DBField;
* {@link SubmittedForm}.
*
* @package userforms
* @property int $UploadedFileID
* @method File UploadedFile()
*/
class SubmittedFileField extends SubmittedFormField
{
private static $has_one = [

View File

@ -12,8 +12,17 @@ use SilverStripe\Forms\GridField\GridFieldPrintButton;
use SilverStripe\Forms\ReadonlyField;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\DB;
use SilverStripe\ORM\HasManyList;
use SilverStripe\Security\Member;
/**
* @package userforms
* @property int $SubmittedByID
* @property int $ParentID
* @method Member SubmittedBy()
* @method DataObject Parent()
* @method HasManyList|SubmittedFormField[] Values()
*/
class SubmittedForm extends DataObject
{
private static $has_one = [

View File

@ -11,6 +11,8 @@ use SilverStripe\UserForms\Model\EditableFormField;
* Data received from a UserDefinedForm submission
*
* @package userforms
* @property string $Name
* @property string $Value
*/
class SubmittedFormField extends DataObject
{

View File

@ -10,16 +10,17 @@ use SilverStripe\Assets\Folder;
use SilverStripe\Core\Config\Configurable;
use SilverStripe\Core\Convert;
use SilverStripe\Core\Environment;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\Core\Injector\Injectable;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\ORM\DataList;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\Queries\SQLSelect;
use SilverStripe\Security\InheritedPermissions;
use SilverStripe\UserForms\Model\EditableFormField;
use SilverStripe\UserForms\Model\EditableFormField\EditableFileField;
use SilverStripe\UserForms\Model\Submission\SubmittedFileField;
use SilverStripe\UserForms\Model\Submission\SubmittedForm;
use SilverStripe\UserForms\Model\Submission\SubmittedFormField;
use SilverStripe\UserForms\Model\Submission\SubmittedFileField;
use SilverStripe\UserForms\Model\UserDefinedForm;
use SilverStripe\Versioned\Versioned;