1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 16:52:41 +01:00

Search and Replace calls to setShade

Summary: grep for setShade and update to setColor. Add deprecated warning.

Test Plan: Diffusion, Workboards, Maniphest, Project tags, tokenizer, uiexamples

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, O14 ATC Monitoring

Differential Revision: https://secure.phabricator.com/D17995
This commit is contained in:
Chad Little 2017-05-22 18:59:53 +00:00 committed by chad
parent 3a0a086a09
commit 00400ae6f9
17 changed files with 26 additions and 20 deletions

View file

@ -29,7 +29,7 @@ final class PHUIUserAvailabilityView
$away_tag = id(new PHUITagView())
->setType(PHUITagView::TYPE_SHADE)
->setShade($color)
->setColor($color)
->setName($name)
->setDotColor($color);

View file

@ -71,7 +71,7 @@ abstract class ConpherenceController extends PhabricatorController {
if (strlen($data['topic'])) {
$topic = id(new PHUITagView())
->setName($data['topic'])
->setShade(PHUITagView::COLOR_VIOLET)
->setColor(PHUITagView::COLOR_VIOLET)
->setType(PHUITagView::TYPE_SHADE)
->addClass('conpherence-header-topic');
$header->addTag($topic);

View file

@ -65,7 +65,7 @@ final class DifferentialRevisionStatus extends Phobject {
$tag = id(new PHUITagView())
->setName($status_name)
->setIcon(self::getRevisionStatusIcon($status))
->setShade(self::getRevisionStatusColor($status))
->setColor(self::getRevisionStatusColor($status))
->setType(PHUITagView::TYPE_SHADE);
return $tag;

View file

@ -44,7 +44,7 @@ final class PhabricatorFileInfoController extends PhabricatorFileController {
if ($ttl !== null) {
$ttl_tag = id(new PHUITagView())
->setType(PHUITagView::TYPE_SHADE)
->setShade(PHUITagView::COLOR_YELLOW)
->setColor(PHUITagView::COLOR_YELLOW)
->setName(pht('Temporary'));
$header->addTag($ttl_tag);
}
@ -53,7 +53,7 @@ final class PhabricatorFileInfoController extends PhabricatorFileController {
if ($partial) {
$partial_tag = id(new PHUITagView())
->setType(PHUITagView::TYPE_SHADE)
->setShade(PHUITagView::COLOR_ORANGE)
->setColor(PHUITagView::COLOR_ORANGE)
->setName(pht('Partial Upload'));
$header->addTag($partial_tag);
}

View file

@ -56,7 +56,7 @@ final class HarbormasterUnitSummaryView extends AphrontView {
$tag = id(new PHUITagView())
->setType(PHUITagView::TYPE_SHADE)
->setShade($tag_color)
->setColor($tag_color)
->setIcon($tag_icon)
->setName($tag_text);

View file

@ -97,7 +97,7 @@ final class ManiphestTaskStatus extends ManiphestConstants {
->setName($name)
->setIcon($icon)
->setType(PHUITagView::TYPE_SHADE)
->setShade($color);
->setColor($color);
return $tag;
}

View file

@ -64,7 +64,7 @@ final class PhabricatorOwnersHovercardEngineExtension
if ($package->isArchived()) {
$tag = id(new PHUITagView())
->setName(pht('Archived'))
->setShade(PHUITagView::COLOR_INDIGO)
->setColor(PHUITagView::COLOR_INDIGO)
->setType(PHUITagView::TYPE_OBJECT);
$hovercard->addTag($tag);
}

View file

@ -85,7 +85,7 @@ final class PhabricatorUserCardView extends AphrontTagView {
->setType(PHUITagView::TYPE_SHADE);
if ($tag_shade !== null) {
$tag->setShade($tag_shade);
$tag->setColor($tag_shade);
}
$body = array();

View file

@ -331,7 +331,7 @@ final class PhabricatorProjectBoardViewController
$count_tag = id(new PHUITagView())
->setType(PHUITagView::TYPE_SHADE)
->setShade(PHUITagView::COLOR_BLUE)
->setColor(PHUITagView::COLOR_BLUE)
->addSigil('column-points')
->setName(
javelin_tag(

View file

@ -211,7 +211,7 @@ final class PhabricatorProjectSearchEngine
$options[$color] = array(
id(new PHUITagView())
->setType(PHUITagView::TYPE_SHADE)
->setShade($color)
->setColor($color)
->setName($name),
);
}

View file

@ -100,7 +100,7 @@ final class ProjectBoardTaskCard extends Phobject {
if ($points !== null) {
$points_tag = id(new PHUITagView())
->setType(PHUITagView::TYPE_SHADE)
->setShade(PHUITagView::COLOR_GREY)
->setColor(PHUITagView::COLOR_GREY)
->setSlimShady(true)
->setName($points)
->addClass('phui-workcard-points');

View file

@ -64,7 +64,7 @@ final class PhabricatorFulltextToken extends Phobject {
$tag = id(new PHUITagView())
->setType(PHUITagView::TYPE_SHADE)
->setShade($shade)
->setColor($shade)
->setName($token->getValue());
if ($tip !== null) {

View file

@ -187,12 +187,12 @@ final class PHUITagExample extends PhabricatorUIExample {
foreach ($outlines as $outline) {
$tags[] = id(new PHUITagView())
->setType(PHUITagView::TYPE_OUTLINE)
->setShade($outline)
->setColor($outline)
->setName($outline);
$tags[] = hsprintf(' ');
$tags[] = id(new PHUITagView())
->setType(PHUITagView::TYPE_OUTLINE)
->setShade($outline)
->setColor($outline)
->setSlimShady(true)
->setName($outline);
$tags[] = hsprintf('<br /><br />');

View file

@ -148,7 +148,7 @@ final class PHUIDiffInlineCommentDetailView
->setType(PHUITagView::TYPE_SHADE)
->setName(pht('Unsubmitted'))
->setSlimShady(true)
->setShade(PHUITagView::COLOR_RED)
->setColor(PHUITagView::COLOR_RED)
->addClass('mml inline-draft-text');
}
@ -383,7 +383,7 @@ final class PHUIDiffInlineCommentDetailView
->setType(PHUITagView::TYPE_SHADE)
->setName(pht('Author'))
->setSlimShady(true)
->setShade(PHUITagView::COLOR_YELLOW)
->setColor(PHUITagView::COLOR_YELLOW)
->addClass('mml');
}
}

View file

@ -60,7 +60,7 @@ final class PhabricatorNavigationRemarkupRule extends PhutilRemarkupRule {
$tag = id(new PHUITagView())
->setType(PHUITagView::TYPE_SHADE)
->setShade($item_color)
->setColor($item_color)
->setName($item_name);
if ($item['icon']) {

View file

@ -131,7 +131,7 @@ final class PHUIHeaderView extends AphrontTagView {
$tag = id(new PHUITagView())
->setName($name)
->setIcon($icon)
->setShade($color)
->setColor($color)
->setType(PHUITagView::TYPE_SHADE);
return $this->addProperty(self::PROPERTY_STATUS, $tag);

View file

@ -57,8 +57,14 @@ final class PHUITagView extends AphrontTagView {
return $this;
}
/* Deprecated, use setColor */
/**
* This method has been deprecated, use @{method:setColor} instead.
*
* @deprecated
*/
public function setShade($shade) {
phlog(
pht('Deprecated call to setShade(), use setColor() instead.'));
$this->color = $shade;
return $this;
}