comparison vendor/symfony/dom-crawler/Field/ChoiceFormField.php @ 13:5fb285c0d0e3

Update Drupal core to 8.4.7 via Composer. Security update; I *think* we've been lucky to get away with this so far, as we don't support self-registration which seems to be used by the so-called "drupalgeddon 2" attack that 8.4.5 was vulnerable to.
author Chris Cannam
date Mon, 23 Apr 2018 09:33:26 +0100
parents 4c8ae668cc8c
children 129ea1e6d783
comparison
equal deleted inserted replaced
12:7a779792577d 13:5fb285c0d0e3
95 95
96 $this->setValue(true); 96 $this->setValue(true);
97 } 97 }
98 98
99 /** 99 /**
100 * Ticks a checkbox. 100 * Unticks a checkbox.
101 * 101 *
102 * @throws \LogicException When the type provided is not correct 102 * @throws \LogicException When the type provided is not correct
103 */ 103 */
104 public function untick() 104 public function untick()
105 { 105 {
106 if ('checkbox' !== $this->type) { 106 if ('checkbox' !== $this->type) {
107 throw new \LogicException(sprintf('You cannot tick "%s" as it is not a checkbox (%s).', $this->name, $this->type)); 107 throw new \LogicException(sprintf('You cannot untick "%s" as it is not a checkbox (%s).', $this->name, $this->type));
108 } 108 }
109 109
110 $this->setValue(false); 110 $this->setValue(false);
111 } 111 }
112 112
113 /** 113 /**
114 * Sets the value of the field. 114 * Sets the value of the field.
115 * 115 *
116 * @param string $value The value of the field 116 * @param string|array $value The value of the field
117 * 117 *
118 * @throws \InvalidArgumentException When value type provided is not correct 118 * @throws \InvalidArgumentException When value type provided is not correct
119 */ 119 */
120 public function setValue($value) 120 public function setValue($value)
121 { 121 {