1 | <?php |
||
27 | class SubmitButtonWidget extends Widget |
||
28 | { |
||
29 | /** |
||
30 | * @var string The label which should be displayed on button. |
||
31 | */ |
||
32 | public $label; |
||
33 | |||
34 | /** |
||
35 | * @var string The label which should be visible when the button is pushed. for example `... sending`. |
||
36 | */ |
||
37 | public $pushed; |
||
38 | |||
39 | /** |
||
40 | * @var array An array with Options which can be passed to the button, see {{luya\helpers\Html::submitButton}}. |
||
41 | */ |
||
42 | public $options = []; |
||
43 | |||
44 | /** |
||
45 | * @var activeForm Define activeForm context to use widget in context and only disable button when validation succeeded |
||
46 | * @since 1.0.24 First time this was introduced |
||
47 | */ |
||
48 | private $_activeForm; |
||
49 | |||
50 | /** |
||
51 | * @param $activeForm Set $activeForm and check for type "ActiveForm" |
||
52 | * @since 1.0.24 |
||
53 | */ |
||
54 | public function setActiveForm(ActiveForm $activeForm) |
||
58 | |||
59 | /** |
||
60 | * @return ActiveForm Return $activeForm |
||
61 | * @since 1.0.24 |
||
62 | */ |
||
63 | public function getActiveForm() |
||
67 | |||
68 | /** |
||
69 | * {@inheritDoc} |
||
70 | */ |
||
71 | public function init() |
||
79 | |||
80 | /** |
||
81 | * Add beforeSubmit handler which disables button and replaces button text |
||
82 | * @return string |
||
83 | * @since 1.0.24 Added "ActiveForm-Mode" which only disables button when given ActiveForm is validated successful |
||
84 | */ |
||
85 | public function run() |
||
117 | |||
118 | } |
||
119 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..