Legoktm has uploaded a new change for review.
https://gerrit.wikimedia.org/r/280805
Change subject: LabelElement: Rename protected "label" property
......................................................................
LabelElement: Rename protected "label" property
This renames the "label" property to "labelValue" because the move to
traits will cause a conflict with the other "label" property
representing the target Tag.
Change-Id: I29f2580ace1a58c6b53ee16867a5b27ea0889eca
---
M php/mixins/LabelElement.php
1 file changed, 8 insertions(+), 8 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/05/280805/1
diff --git a/php/mixins/LabelElement.php b/php/mixins/LabelElement.php
index 663972c..0daa862 100644
--- a/php/mixins/LabelElement.php
+++ b/php/mixins/LabelElement.php
@@ -13,7 +13,7 @@
*
* @var string|HtmlSnippet|null
*/
- protected $label = null;
+ protected $labelValue = null;
public static $targetPropertyName = 'label';
@@ -43,18 +43,18 @@
* @return $this
*/
public function setLabel( $label ) {
- $this->label = (string)$label ? $label : null;
+ $this->labelValue = (string)$label ? $label : null;
$this->target->clearContent();
- if ( $this->label !== null ) {
- if ( is_string( $this->label ) && $this->label !== ''
&& trim( $this->label ) === '' ) {
+ if ( $this->labelValue !== null ) {
+ if ( is_string( $this->labelValue ) &&
$this->labelValue !== '' && trim( $this->labelValue ) === '' ) {
$this->target->appendContent( new HtmlSnippet(
' ' ) );
} else {
$this->target->appendContent( $label );
}
}
- $this->element->toggleClasses( [ 'oo-ui-labelElement' ],
!!$this->label );
+ $this->element->toggleClasses( [ 'oo-ui-labelElement' ],
!!$this->labelValue );
return $this;
}
@@ -65,12 +65,12 @@
* @return string|HtmlSnippet|null Label text
*/
public function getLabel() {
- return $this->label;
+ return $this->labelValue;
}
public function getConfig( &$config ) {
- if ( $this->label !== null ) {
- $config['label'] = $this->label;
+ if ( $this->labelValue !== null ) {
+ $config['label'] = $this->labelValue;
}
return parent::getConfig( $config );
}
--
To view, visit https://gerrit.wikimedia.org/r/280805
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I29f2580ace1a58c6b53ee16867a5b27ea0889eca
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits