[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class PhabricatorUIConfigOptions 4 extends PhabricatorApplicationConfigOptions { 5 6 public function getName() { 7 return pht('User Interface'); 8 } 9 10 public function getDescription() { 11 return pht('Configure the Phabricator UI, including colors.'); 12 } 13 14 public function getOptions() { 15 $manifest = PHUIIconView::getSheetManifest('main-header'); 16 17 $options = array(); 18 foreach (array_keys($manifest) as $sprite_name) { 19 $key = substr($sprite_name, strlen('main-header-')); 20 $options[$key] = $key; 21 } 22 23 $example = <<<EOJSON 24 [ 25 { 26 "name" : "Copyright 2199 Examplecorp" 27 }, 28 { 29 "name" : "Privacy Policy", 30 "href" : "http://www.example.org/privacy/" 31 }, 32 { 33 "name" : "Terms and Conditions", 34 "href" : "http://www.example.org/terms/" 35 } 36 ] 37 EOJSON; 38 39 return array( 40 $this->newOption('ui.header-color', 'enum', 'dark') 41 ->setDescription( 42 pht( 43 'Sets the color of the main header.')) 44 ->setEnumOptions($options), 45 $this->newOption('ui.footer-items', 'list<wild>', array()) 46 ->setSummary( 47 pht( 48 'Allows you to add footer links on most pages.')) 49 ->setDescription( 50 pht( 51 "Allows you to add a footer with links in it to most ". 52 "pages. You might want to use these links to point at legal ". 53 "information or an about page.\n\n". 54 "Specify a list of dictionaries. Each dictionary describes ". 55 "a footer item. These keys are supported:\n\n". 56 " - `name` The name of the item.\n". 57 " - `href` Optionally, the link target of the item. You can ". 58 " omit this if you just want a piece of text, like a copyright ". 59 " notice.")) 60 ->addExample($example, pht('Basic Example')), 61 ); 62 } 63 64 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |