@@ -6,9 +6,7 @@ |
||
| 6 | 6 | use SilverStripe\Control\Controller; |
| 7 | 7 | use SilverStripe\Forms\DatetimeField; |
| 8 | 8 | use SilverStripe\Forms\RequiredFields; |
| 9 | -use SilverStripe\Forms\DateField; |
|
| 10 | 9 | use SilverStripe\Forms\Tests\DatetimeFieldTest\Model; |
| 11 | -use SilverStripe\Forms\TimeField; |
|
| 12 | 10 | use SilverStripe\Forms\FieldList; |
| 13 | 11 | use SilverStripe\Forms\FormAction; |
| 14 | 12 | use SilverStripe\Forms\Form; |
@@ -270,6 +270,9 @@ discard block |
||
| 270 | 270 | |
| 271 | 271 | |
| 272 | 272 | |
| 273 | + /** |
|
| 274 | + * @param boolean $disabled |
|
| 275 | + */ |
|
| 273 | 276 | public function setDisabled($disabled) |
| 274 | 277 | { |
| 275 | 278 | parent::setDisabled($disabled); |
@@ -279,6 +282,9 @@ discard block |
||
| 279 | 282 | return $this; |
| 280 | 283 | } |
| 281 | 284 | |
| 285 | + /** |
|
| 286 | + * @param boolean $readonly |
|
| 287 | + */ |
|
| 282 | 288 | public function setReadonly($readonly) |
| 283 | 289 | { |
| 284 | 290 | parent::setReadonly($readonly); |
@@ -371,6 +377,10 @@ discard block |
||
| 371 | 377 | $this->children->removeByName($fieldName, $dataFieldOnly); |
| 372 | 378 | } |
| 373 | 379 | |
| 380 | + /** |
|
| 381 | + * @param string $fieldName |
|
| 382 | + * @param FormField $newField |
|
| 383 | + */ |
|
| 374 | 384 | public function replaceField($fieldName, $newField) |
| 375 | 385 | { |
| 376 | 386 | return $this->children->replaceField($fieldName, $newField); |
@@ -456,6 +466,7 @@ discard block |
||
| 456 | 466 | * the children collection. Doesn't work recursively. |
| 457 | 467 | * |
| 458 | 468 | * @param string|FormField |
| 469 | + * @param string $field |
|
| 459 | 470 | * @return int Position in children collection (first position starts with 0). Returns FALSE if the field can't |
| 460 | 471 | * be found. |
| 461 | 472 | */ |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | /** |
| 141 | - * @param $bool |
|
| 141 | + * @param boolean $bool |
|
| 142 | 142 | * @return $this |
| 143 | 143 | */ |
| 144 | 144 | public function setHTML5($bool) |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | * Assign value posted from form submission, based on {@link $datetimeFormat}. |
| 152 | 152 | * When $html5=true, this needs to be normalised ISO format (with "T" separator). |
| 153 | 153 | * |
| 154 | - * @param mixed $value |
|
| 154 | + * @param string $value |
|
| 155 | 155 | * @param mixed $data |
| 156 | 156 | * @return $this |
| 157 | 157 | */ |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | * When $html5=true, assign value from ISO 8601 normalised string (with a "T" separator). |
| 318 | 318 | * Falls back to an ISO 8601 string (with a whitespace separator). |
| 319 | 319 | * |
| 320 | - * @param mixed $value |
|
| 320 | + * @param string $value |
|
| 321 | 321 | * @param mixed $data |
| 322 | 322 | * @return $this |
| 323 | 323 | */ |
@@ -492,6 +492,9 @@ discard block |
||
| 492 | 492 | return $this; |
| 493 | 493 | } |
| 494 | 494 | |
| 495 | + /** |
|
| 496 | + * @param boolean $bool |
|
| 497 | + */ |
|
| 495 | 498 | public function setReadonly($bool) |
| 496 | 499 | { |
| 497 | 500 | parent::setReadonly($bool); |
@@ -49,6 +49,9 @@ discard block |
||
| 49 | 49 | return parent::login($request, Authenticator::CMS_LOGIN); |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | + /** |
|
| 53 | + * @param string $action |
|
| 54 | + */ |
|
| 52 | 55 | public function Link($action = null) |
| 53 | 56 | { |
| 54 | 57 | /** @skipUpgrade */ |
@@ -79,6 +82,9 @@ discard block |
||
| 79 | 82 | return null; |
| 80 | 83 | } |
| 81 | 84 | |
| 85 | + /** |
|
| 86 | + * @param string $title |
|
| 87 | + */ |
|
| 82 | 88 | public function getResponseController($title) |
| 83 | 89 | { |
| 84 | 90 | // Use $this to prevent use of Page to render underlying templates |
@@ -8,9 +8,7 @@ |
||
| 8 | 8 | use SilverStripe\Core\Convert; |
| 9 | 9 | use SilverStripe\Control\Director; |
| 10 | 10 | use SilverStripe\Control\Controller; |
| 11 | -use SilverStripe\Core\Injector\Injector; |
|
| 12 | 11 | use SilverStripe\ORM\FieldType\DBField; |
| 13 | -use SilverStripe\Security\MemberAuthenticator\CMSMemberAuthenticator; |
|
| 14 | 12 | use SilverStripe\View\Requirements; |
| 15 | 13 | |
| 16 | 14 | /** |
@@ -111,7 +111,7 @@ |
||
| 111 | 111 | /** |
| 112 | 112 | * Global permissions required to edit |
| 113 | 113 | * |
| 114 | - * @param array $permissions |
|
| 114 | + * @param string[] $permissions |
|
| 115 | 115 | * @return $this |
| 116 | 116 | */ |
| 117 | 117 | public function setGlobalEditPermissions($permissions) |
@@ -161,7 +161,7 @@ |
||
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | /** |
| 164 | - * @param string|bool|array $content If passed as an array, values will be concatenated with a comma. |
|
| 164 | + * @param string $content If passed as an array, values will be concatenated with a comma. |
|
| 165 | 165 | * @return array |
| 166 | 166 | */ |
| 167 | 167 | public static function getHTMLChunks($content) |
@@ -479,6 +479,7 @@ |
||
| 479 | 479 | * |
| 480 | 480 | * @When /^(?:|I )fill in the "(?P<field>(?:[^"]|\\")*)" dropdown with "(?P<value>(?:[^"]|\\")*)"$/ |
| 481 | 481 | * @When /^(?:|I )fill in "(?P<value>(?:[^"]|\\")*)" for the "(?P<field>(?:[^"]|\\")*)" dropdown$/ |
| 482 | + * @param string $field |
|
| 482 | 483 | */ |
| 483 | 484 | public function theIFillInTheDropdownWith($field, $value) |
| 484 | 485 | { |
@@ -6,7 +6,6 @@ |
||
| 6 | 6 | use Behat\Mink\Session; |
| 7 | 7 | use Behat\Behat\Context\Context; |
| 8 | 8 | use SilverStripe\BehatExtension\Context\MainContextAwareTrait; |
| 9 | -use SilverStripe\BehatExtension\Context\RetryableContextTrait; |
|
| 10 | 9 | use SilverStripe\BehatExtension\Utility\StepHelper; |
| 11 | 10 | |
| 12 | 11 | /** |
@@ -5,7 +5,6 @@ discard block |
||
| 5 | 5 | use SilverStripe\Core\Config\Config; |
| 6 | 6 | use SilverStripe\Core\ClassInfo; |
| 7 | 7 | use SilverStripe\Dev\SapphireTest; |
| 8 | -use SilverStripe\Control\Controller; |
|
| 9 | 8 | use SilverStripe\Forms\FormField; |
| 10 | 9 | use SilverStripe\Forms\Tests\FormFieldTest\TestExtension; |
| 11 | 10 | use SilverStripe\Forms\TextField; |
@@ -13,7 +12,6 @@ discard block |
||
| 13 | 12 | use SilverStripe\Forms\FieldList; |
| 14 | 13 | use SilverStripe\Forms\Form; |
| 15 | 14 | use ReflectionClass; |
| 16 | -use SilverStripe\ORM\FieldType\DBField; |
|
| 17 | 15 | |
| 18 | 16 | class FormFieldTest extends SapphireTest |
| 19 | 17 | { |
@@ -88,6 +88,9 @@ |
||
| 88 | 88 | $this->mockButtonFragments($list, null); |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | + /** |
|
| 92 | + * @param \SilverStripe\ORM\DataObject $parent |
|
| 93 | + */ |
|
| 91 | 94 | protected function mockButtonFragments(SS_List $list, $parent = null) |
| 92 | 95 | { |
| 93 | 96 | $form = Form::create( |