Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/syntax/PhabricatorSyntaxStyle.php
Show All 21 Lines | abstract class PhabricatorSyntaxStyle extends Phobject { | ||||
public static function getAllStyles() { | public static function getAllStyles() { | ||||
return id(new PhutilClassMapQuery()) | return id(new PhutilClassMapQuery()) | ||||
->setAncestorClass(__CLASS__) | ->setAncestorClass(__CLASS__) | ||||
->setUniqueMethod('getSyntaxStyleKey') | ->setUniqueMethod('getSyntaxStyleKey') | ||||
->setSortMethod('getStyleName') | ->setSortMethod('getStyleName') | ||||
->execute(); | ->execute(); | ||||
} | } | ||||
final public function getRemarkupStyleMap() { | |||||
$map = array( | |||||
'rbw_r' => 'color: red', | |||||
'rbw_o' => 'color: orange', | |||||
'rbw_y' => 'color: yellow', | |||||
'rbw_g' => 'color: green', | |||||
'rbw_b' => 'color: blue', | |||||
'rbw_i' => 'color: indigo', | |||||
'rbw_v' => 'color: violet', | |||||
); | |||||
return $map + $this->getStyleMap(); | |||||
} | |||||
} | } |