Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/280793

Change subject: IconElement: Rename protected "icon" property
......................................................................

IconElement: Rename protected "icon" property

This renames the "icon" property to "iconName" because the move to
traits will cause a conflict with the other "icon" property representing
the target Tag.

There will be a slight inconsistency with the JavaScript version now,
however that was already inconsistent because that used "$icon" to
represent the icon object, which we can't do in PHP.

Change-Id: I778e64592b695943eb9659665696c7a69ab27eed
---
M php/mixins/IconElement.php
1 file changed, 8 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/93/280793/1

diff --git a/php/mixins/IconElement.php b/php/mixins/IconElement.php
index 2a8cd0f..a55f1d8 100644
--- a/php/mixins/IconElement.php
+++ b/php/mixins/IconElement.php
@@ -18,7 +18,7 @@
         *
         * @var string
         */
-       protected $icon = null;
+       protected $iconName = null;
 
        public static $targetPropertyName = 'icon';
 
@@ -45,15 +45,15 @@
         * @return $this
         */
        public function setIcon( $icon = null ) {
-               if ( $this->icon !== null ) {
-                       $this->target->removeClasses( [ 'oo-ui-icon-' . 
$this->icon ] );
+               if ( $this->iconName !== null ) {
+                       $this->target->removeClasses( [ 'oo-ui-icon-' . 
$this->iconName ] );
                }
                if ( $icon !== null ) {
                        $this->target->addClasses( [ 'oo-ui-icon-' . $icon ] );
                }
 
-               $this->icon = $icon;
-               $this->element->toggleClasses( [ 'oo-ui-iconElement' ], 
(bool)$this->icon );
+               $this->iconName = $icon;
+               $this->element->toggleClasses( [ 'oo-ui-iconElement' ], 
(bool)$this->iconName );
 
                return $this;
        }
@@ -64,12 +64,12 @@
         * @return string Icon name
         */
        public function getIcon() {
-               return $this->icon;
+               return $this->iconName;
        }
 
        public function getConfig( &$config ) {
-               if ( $this->icon !== null ) {
-                       $config['icon'] = $this->icon;
+               if ( $this->iconName !== null ) {
+                       $config['icon'] = $this->iconName;
                }
                return parent::getConfig( $config );
        }

-- 
To view, visit https://gerrit.wikimedia.org/r/280793
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I778e64592b695943eb9659665696c7a69ab27eed
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

Reply via email to