Not a member of Pastebin yet?
                        Sign Up,
                        it unlocks many cool features!                    
                - <?php
 - /**
 - * Description of TProgressBar
 - *
 - * @author ademilson Nunes
 - */
 - class TProgressBar extends TElement
 - {
 - private $value;
 - public function __construct()
 - {
 - parent::__construct('div');
 - $this->class = 'progress';
 - $this->id = 'bar_' . uniqid();
 - }
 - public function setValue($value)
 - {
 - $this->value = $value;
 - }
 - /**
 - * Shows the widget at the screen
 - */
 - public function show()
 - {
 - $progressBar = new TElement('div');
 - $progressBar->class = 'progress-bar';
 - $progressBar->role = 'progressbar';
 - $progressBar->{'arial-valuenow'} = $this->value;
 - $progressBar->{'arial-valuemin'} = '0';
 - $progressBar->{'arial-valuemax'} = '100';
 - $progressBar->style='width: ' . $this->value . '%;';
 - $progressBar->add($this->value . '%');
 - parent::add($progressBar);
 - parent::show();
 - }
 - }
 
Advertisement
 
                    Add Comment                
                
                        Please, Sign In to add comment