FIX Remove unused namespace references and add to doc block references

This commit is contained in:
Robbie Averill 2017-09-05 09:45:16 +12:00
parent 9929284a9b
commit be0b843981
11 changed files with 21 additions and 22 deletions

View File

@ -212,11 +212,11 @@ class UserFormFieldEditorExtension extends DataExtension
/**
* When duplicating a UserDefinedForm, duplicate all of its fields and display rules
*
* @see DataObject::duplicate
* @param DataObject $oldPage
* @see \SilverStripe\ORM\DataObject::duplicate
* @param \SilverStripe\ORM\DataObject $oldPage
* @param bool $doWrite
* @param string $manyMany
* @return DataObject
* @return \SilverStripe\ORM\DataObject
*/
public function onAfterDuplicate($oldPage, $doWrite, $manyMany)
{

View File

@ -92,7 +92,7 @@ class UserForm extends Form
/**
* Return the fieldlist, filtered to only contain steps
*
* @return ArrayList
* @return \SilverStripe\ORM\ArrayList
*/
public function getSteps()
{

View File

@ -7,7 +7,6 @@ use SilverStripe\CMS\Controllers\CMSMain;
use SilverStripe\Control\Controller;
use SilverStripe\Core\Convert;
use SilverStripe\ORM\DataObject;
use SilverStripe\UserForms\Model\EditableFormField;
use Silverstripe\Versioned\Versioned;
/**

View File

@ -6,7 +6,6 @@ use SilverStripe\Core\Manifest\ModuleLoader;
use SilverStripe\Forms\DropdownField;
use SilverStripe\i18n\i18n;
use SilverStripe\UserForms\Model\EditableCustomRule;
use SilverStripe\UserForms\Model\EditableDropdownField;
use SilverStripe\UserForms\Model\EditableFormField;
/**
@ -38,8 +37,8 @@ class EditableCountryDropdownField extends EditableFormField
{
$field = DropdownField::create($this->Name, $this->EscapedTitle)
->setSource(i18n::getData()->getCountries())
->setFieldHolderTemplate('UserFormsField_holder')
->setTemplate(EditableDropdownField::class);
->setFieldHolderTemplate(EditableFormField::class . '_holder')
->setTemplate(EditableDropdown::class);
$this->doUpdateFormField($field);

View File

@ -6,6 +6,7 @@ use SilverStripe\Forms\CheckboxField;
use SilverStripe\Forms\DropdownField;
use SilverStripe\Forms\TextField;
use SilverStripe\UserForms\Model\EditableCustomRule;
use SilverStripe\UserForms\Model\EditableFormField;
/**
* EditableDropdown

View File

@ -6,7 +6,6 @@ use SilverStripe\Core\Convert;
use SilverStripe\Forms\LabelField;
use SilverStripe\UserForms\FormField\UserFormsGroupField;
use SilverStripe\UserForms\Model\EditableFormField;
use SilverStripe\UserForms\Model\EditableFormField\EditableFieldGroupEnd;
/**
* Specifies that this ends a group of fields

View File

@ -144,7 +144,7 @@ class EditableLiteralField extends EditableFormField
$field = CompositeField::create($content)
->setName($this->Name)
// ->setID($this->Name) // @todo
// ->setID($this->Name) // @todo: https://github.com/silverstripe/silverstripe-framework/issues/7264
->setFieldHolderTemplate(__CLASS__ . '_holder');
$this->doUpdateFormField($field);

View File

@ -12,7 +12,6 @@ use SilverStripe\Forms\GridField\GridFieldToolbarHeader;
use SilverStripe\Forms\Tab;
use SilverStripe\ORM\Map;
use SilverStripe\UserForms\Model\EditableFormField;
use SilverStripe\UserForms\Model\EditableFormField\EditableOption;
use SilverStripe\Versioned\Versioned;
use Symbiote\GridFieldExtensions\GridFieldAddNewInlineButton;
use Symbiote\GridFieldExtensions\GridFieldEditableColumns;
@ -57,7 +56,7 @@ class EditableMultipleOptionField extends EditableFormField
private static $table_name = 'EditableMultipleOptionField';
/**
* @return FieldList
* @return \SilverStripe\Forms\FieldList
*/
public function getCMSFields()
{
@ -133,7 +132,7 @@ class EditableMultipleOptionField extends EditableFormField
/**
* Return whether or not this field has addable options such as a
* {@link EditableDropdownField} or {@link EditableRadioField}
* {@link EditableDropdown} or {@link EditableRadioField}
*
* @return bool
*/
@ -160,7 +159,7 @@ class EditableMultipleOptionField extends EditableFormField
/**
* Returns all default options
*
* @return SS_List
* @return \SilverStripe\ORM\SS_List
*/
protected function getDefaultOptions()
{

View File

@ -54,10 +54,13 @@ class UserFormRecipientItemRequest extends GridFieldDetailForm_ItemRequest
{
$data = ArrayList::create();
$fields = $this->record->Form()->Fields()->filter([
'ClassName:not' => EditableLiteralField::class,
'ClassName:not' => EditableFormHeading::class
]);
$fields = $this->record->Form()->Fields()->filter(
'ClassName:not',
[
EditableLiteralField::class,
EditableFormHeading::class,
]
);
foreach ($fields as $field) {
$data->push(ArrayData::create([

View File

@ -36,7 +36,6 @@ use SilverStripe\UserForms\Form\UserFormsGridFieldFilterHeader;
use SilverStripe\UserForms\Model\Recipient\EmailRecipient;
use SilverStripe\UserForms\Model\Recipient\UserFormRecipientItemRequest;
use SilverStripe\UserForms\Model\Submission\SubmittedForm;
use SilverStripe\UserForms\Task\UserFormsUpgradeService;
use SilverStripe\View\Requirements;
/**

View File

@ -142,7 +142,7 @@ class UserDefinedFormController extends PageController
* Get the form for the page. Form can be modified by calling {@link updateForm()}
* on a UserDefinedForm extension.
*
* @return Forms
* @return Form
*/
public function Form()
{
@ -198,7 +198,7 @@ JS
* @param array $data
* @param Form $form
*
* @return Redirection
* @return \SilverStripe\Control\HTTPResponse
*/
public function process($data, $form)
{
@ -400,7 +400,7 @@ JS
/**
* Allows the use of field values in email body.
*
* @param ArrayList fields
* @param ArrayList $fields
* @return ArrayData
*/
protected function getMergeFieldsMap($fields = [])