Add name property to TextEdit (for Manialink Actions)
This commit is contained in:
		| @@ -101,6 +101,30 @@ class TextEdit extends Control implements MultiLineable, Scriptable, Styleable, | |||||||
|      */ |      */ | ||||||
|     protected $focusAreaColor = null; |     protected $focusAreaColor = null; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Get the name | ||||||
|  |      * | ||||||
|  |      * @api | ||||||
|  |      * @return string | ||||||
|  |      */ | ||||||
|  |     public function getName() | ||||||
|  |     { | ||||||
|  |         return $this->name; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Set the name | ||||||
|  |      * | ||||||
|  |      * @api | ||||||
|  |      * @param string $name Entry name | ||||||
|  |      * @return static | ||||||
|  |      */ | ||||||
|  |     public function setName($name) | ||||||
|  |     { | ||||||
|  |         $this->name = (string)$name; | ||||||
|  |         return $this; | ||||||
|  |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Get the default value |      * Get the default value | ||||||
|      * |      * | ||||||
| @@ -400,6 +424,9 @@ class TextEdit extends Control implements MultiLineable, Scriptable, Styleable, | |||||||
|     public function render(\DOMDocument $domDocument) |     public function render(\DOMDocument $domDocument) | ||||||
|     { |     { | ||||||
|         $domElement = parent::render($domDocument); |         $domElement = parent::render($domDocument); | ||||||
|  |         if ($this->name) { | ||||||
|  |             $domElement->setAttribute("name", $this->name); | ||||||
|  |         } | ||||||
|         if ($this->default !== null) { |         if ($this->default !== null) { | ||||||
|             $domElement->setAttribute("default", $this->default); |             $domElement->setAttribute("default", $this->default); | ||||||
|         } |         } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user