Wrapper for tables. Arrays passed in must be indexed with column names.

 $table = new \PHPFUI\Table(); $table->setHeaders({'value' => 'Members Signed In', 'key' => 'In the Past X Days']);
 $table->addColumnAttribute('value', ['style' => 'text-align:center;']);
 foreach ($results as $key => $value)
   $signupTable->addRow(['key' => $key, 'value' => $value]);
public PHPFUI\Base::DEBUG_SOURCE = 1
public PHPFUI\HTML5Element::__clone()
public __construct()
public PHPFUI\Base::__toString() : string
public PHPFUI\Base::add( $item)
Base add function. Adds to the end of the current objects

public addArrowNavigation(PHPFUI\Page $page) : PHPFUI\Table
Allow arrow keys to move up and down rows with edit controls in them.

public PHPFUI\Base::addAsFirst( $item)
Base addAsFirst function. Adds to the front of the current object

public PHPFUI\HTML5Element::addAttribute(string $attribute, string $value = '') : PHPFUI\HTML5Element
Add an attribute the the object

    public PHPFUI\HTML5Element::addClass(string $class) : PHPFUI\HTML5Element
    Add a class to an object

      public addColumnAttribute(string $column, array $attributePairs) : PHPFUI\Table
      Add an attribute to a column

        public addFooter(string $field, string $footer) : PHPFUI\Table
        Add one footer field

          public addHeader(string $field, string $header) : PHPFUI\Table
          Add one header field

            public addNextRowAttribute(string $attribute, string $value) : PHPFUI\Table
            You can add any attribute to the next row (tr) that you want. This only applies to the next row to be output and is reset for the next row.

            public addRow(array $row, array $colspans = []) : PHPFUI\Table
            Add a row. You can also pass column spans which are possitional and do not need keys corresponding index to the row.

              public count() : int
              Number of rows in the table.

              public PHPFUI\HTML5Element::deleteAttribute(string $attribute) : PHPFUI\HTML5Element
              Deletes the passed attribute

              public PHPFUI\HTML5Element::deleteAttributes() : PHPFUI\HTML5Element
              Deletes all attributes

              public PHPFUI\HTML5Element::deleteClass(string $classToDelete) : PHPFUI\HTML5Element
              Delete a class from the object

              public PHPFUI\HTML5Element::disabled() : PHPFUI\HTML5Element
              Disabled the element

              public displayHeaders(bool $display = true) : PHPFUI\Table
              Turn off headers by passing false

              public PHPFUI\Base::done(bool $done = true) : PHPFUI\Base
              Form is done rendering

              public PHPFUI\HTML5Element::getAttribute(string $attribute) : string
              Get an attribute

              • return ?string does not exist if null
              public PHPFUI\HTML5Element::getAttributes() : string
              Returns the attribute strings. Attributes with values are returned as name/value pairs, attributes without values are returned as just the attribute name.

              public PHPFUI\HTML5Element::getClass() : string
              Returns the class attribute ready for insertion into an element.

              public PHPFUI\HTML5Element::getClasses() : array
              Returns all classes for the object

              public static PHPFUI\Base::getDebug(int $flags = 0) : int
              Gets the current debug setting

              public PHPFUI\HTML5Element::getElement() : string
              Return the type of the element

              public PHPFUI\HTML5Element::getId() : string
              Return the id of the object. Elements will not have an id unless this method is called. The id is returned as a string starting with id followed by a unique number to the page. Id numbers are deterministic and start start with 1. Once assigned an id, an element will always have the same id. It will get a new id if cloned.

              public PHPFUI\HTML5Element::getIdAttribute() : string
              Return the id attribute of the object as a name/value pair. If no id has been requested, and empty string is returned.

              public getRecordId() : string
              Return the index key used to give each row a unique id.

              public PHPFUI\Base::getResponse() : string
              Get the current response

              public PHPFUI\HTML5Element::getToolTip(string $label)
              Get the tool tip as a string

              • return ToolTip|string return type depends on if the tip was set as a string or ToolTip object.
              public PHPFUI\HTML5Element::hasClass(string $class) : bool
              Return true if the class is present on the object

              public PHPFUI\HTML5Element::hasId() : bool
              Does this object have an id set already?

              public PHPFUI\HTML5Element::hasToolTip() : bool

              • return bool if there is a tool tip associated with this element
              public PHPFUI\Base::isDone() : bool
              Returns true if the page needs no more processing

              public PHPFUI\HTML5Element::newId() : PHPFUI\HTML5Element
              Assign a new id to this element.

              public PHPFUI\Base::output() : string
              Output the object (convert to string)

              • return string
              public PHPFUI\Base::prepend( $item) : PHPFUI\Base
              Add an object in front of existing object

              public setAlwaysOutput(bool $alwaysOutput = true) : PHPFUI\Table
              By default, tables will not output if they have no rows

              public PHPFUI\HTML5Element::setAttribute(string $attribute, string $value = '') : PHPFUI\HTML5Element
              Set the attribute overwriting the prior value

                public setCaption(string $caption) : PHPFUI\Table
                Set the table caption

                public PHPFUI\HTML5Element::setConfirm( $text) : PHPFUI\HTML5Element
                A simple way to set a confirm on click

                  public static PHPFUI\Base::setDebug(int $level = 0) : void
                  Set the debug level, 1 or higher is on

                  public PHPFUI\HTML5Element::setElement( $element) : PHPFUI\HTML5Element
                  You can set the element type if you need to morph it for some reason

                    public setFooters(array $footers) : PHPFUI\Table
                    Set the footers for the table. Array indexes should correspond to the row indexs.

                    public setHeaders(array $headers) : PHPFUI\Table
                    Set the headers

                      public PHPFUI\HTML5Element::setId( $id) : PHPFUI\HTML5Element
                      Set the base id of the object

                        public PHPFUI\Base::setRawResponse(string $response) : PHPFUI\Base
                        Sets the page response directly

                        public setRecordId(string $key) : PHPFUI\Table
                        Specify the row index key that will be used to form a unique Id for the row.

                        $key should be the index into the row array that uniquely identifies the row in the table.

                        public PHPFUI\Base::setResponse(string $response, string $color = 'lime') : PHPFUI\Base
                        Set a response in the standard format ('reponse' and 'color' array)

                          public setRows(array $rows) : PHPFUI\Table
                          Set all the rows for a table

                          public setStrict(bool $strict = true) : PHPFUI\Table
                          Display "Missing X" for each field in a row that does not have a index corresponding to a header. Useful for debugging.

                          public PHPFUI\HTML5Element::setToolTip( $tip) : PHPFUI\HTML5Element
                          Set the tool tip. Can either be a ToolTip or a string. If it is a string, it will be converted to a ToolTip

                            public setWidths(array $widths) : PHPFUI\Table
                            Set widths for each column

                              public PHPFUI\HTML5Element::toggleAnimate(PHPFUI\HTML5Element $element, string $animation) : PHPFUI\HTML5Element
                              Will toggle the provided element on click with the provided animation.

                              public PHPFUI\HTML5Element::toggleClass(PHPFUI\HTML5Element $element, string $class) : PHPFUI\HTML5Element
                              Will toggle the class on the provided element on click.

                              public PHPFUI\HTML5Element::transferAttributes(PHPFUI\HTML5Element $from) : PHPFUI\HTML5Element
                              Moves attributes into this object from the passed object

                              public PHPFUI\HTML5Element::transferClasses(PHPFUI\HTML5Element $from) : PHPFUI\HTML5Element
                              Moves classes into this object from the passed object

                              public PHPFUI\Base::walk(string $method) : PHPFUI\Base
                              Recursively walks all objects and calls the passed method on each object where it exists

                              protected $alwaysOutput
                              protected $caption
                              protected $colspans
                              protected $columnAttributes
                              protected $displayHeaders
                              protected $footers
                              protected $headers
                              protected $nextRowAttributes
                              protected $page
                              protected $recordId
                              protected $rowAttributes
                              protected $rows
                              protected $sortableBodyClass
                              protected $sortableTrClass
                              protected $strict
                              protected $widths
                              protected getBody() : string
                              protected getEnd() : string
                              protected getSortIndicator(string $field) : string
                              protected getStart() : string
                              protected outputRow(string $td, array $row, string $type = '', array $rowAttributes = [], array $attribute = [], string $attributeName = 'colspan') : string
                              protected PHPFUI\HTML5Element::upCastCopy(PHPFUI\HTML5Element $to, PHPFUI\HTML5Element $from) : PHPFUI\HTML5Element
                              Clones the first object and fills it with properties from the second object

                              public static PHPFUI\Base::getDebug(int $flags = 0) : int
                              Gets the current debug setting

                              public static PHPFUI\Base::setDebug(int $level = 0) : void
                              Set the debug level, 1 or higher is on

                              © 2020 Bruce Wells
                              Search Namespaces \ Classes
                              ConfigurationNumbers (0-9.) only