HTML_Progress
[ class tree: HTML_Progress ] [ index: HTML_Progress ] [ all elements ]
Prev Next

getCellAttributes Manual

returns attributes list of the progress bar cells

by by Laurent Laville
mailto:pear@laurent-laville.org
November 2003, Laurent Laville
(HTML_Progress 1.0+)

Synopsis

mixed getCellAttributes( $asString )

Attributes

Name Type Default
asString boolean false

Description

The getCellAttributes() method is used to retrieve attributes of progress bar cells. Ouput could be an array or a string.

Example

Example below will show you the attributes definition of progress bar cells in two formats: array (default) and string.

  1. <?php
  2. require_once ('HTML/Progress.php');
  3.  
  4. $bar = new HTML_Progress();
  5. $bar->setBorderPainted(true);
  6.  
  7. $ui =$bar->getUI();
  8. $ui->setCellAttributes('active-color=#3874B4 inactive-color=#EEEECC width=10');
  9.  
  10. print '<pre>';
  11. var_dump($ui->getCellAttributes());         // see output 1.
  12. var_dump($ui->getCellAttributes(true));     // see output 2.
  13. print '</pre>';
  14. ?>

Output 1.

array(10) {
  ["id"]=>
  string(16) "progressCell%01s"
  ["class"]=>
  string(4) "cell"
  ["active-color"]=>
  string(7) "#3874B4"
  ["inactive-color"]=>
  string(7) "#EEEECC"
  ["font-family"]=>
  string(16) "Courier, Verdana"
  ["font-size"]=>
  int(8)
  ["color"]=>
  string(7) "#000000"
  ["width"]=>
  string(2) "10"
  ["height"]=>
  int(20)
  ["spacing"]=>
  int(2)
}
   

Output 2.

string(179) " id="progressCell%01s" class="cell" active-color="#3874B4" inactive-color="#EEEECC" font-family="Courier, Verdana" font-size="8" color="#000000" width="10" height="20" spacing="2""
   

See Also

setCellAttributes Manual

Prev Up Next
setBorderAttributes Manual Reference Guides setCellAttributes Manual

Documentation generated on Mon, 11 Mar 2019 13:52:35 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.