[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/applications/meta/view/ -> PhabricatorApplicationStatusView.php (source)

   1  <?php
   2  
   3  final class PhabricatorApplicationStatusView extends AphrontView {
   4  
   5    private $count;
   6    private $text;
   7    private $type;
   8  
   9    const TYPE_NEEDS_ATTENTION  = 'needs';
  10    const TYPE_INFO             = 'info';
  11    const TYPE_OKAY             = 'okay';
  12    const TYPE_WARNING          = 'warning';
  13    const TYPE_EMPTY            = 'empty';
  14  
  15    public function setType($type) {
  16      $this->type = $type;
  17      return $this;
  18    }
  19  
  20    public function getType() {
  21      return $this->type;
  22    }
  23  
  24    public function setText($text) {
  25      $this->text = $text;
  26      return $this;
  27    }
  28  
  29    public function getText() {
  30      return $this->text;
  31    }
  32  
  33    public function setCount($count) {
  34      $this->count = $count;
  35      return $this;
  36    }
  37  
  38    public function getCount() {
  39      return $this->count;
  40    }
  41  
  42    public function render() {
  43      $type = $this->type;
  44      if (!$this->count) {
  45        $type = self::TYPE_EMPTY;
  46      }
  47  
  48      $classes = array(
  49        'phabricator-application-status',
  50        'phabricator-application-status-type-'.$type,
  51      );
  52  
  53      return phutil_tag(
  54        'span',
  55        array(
  56          'class' => implode(' ', $classes),
  57        ),
  58        $this->text);
  59    }
  60  
  61  }


Generated: Sun Nov 30 09:20:46 2014 Cross-referenced by PHPXref 0.7.1