/** * hideRows * @desc Hides the specified rows from the current view. rowIndexes is an * array of numbers representing the indexes of the rows to hide. These * indexes are the index numbers in the underlying table/view. The numbers * in rowIndexes do not have to be in order (that is, [3,4,1] is fine). The * remaining rows retain their index order. Entering an index number for a * row already hidden is not an error, but entering an index that does not * exist in the underlying table/view will throw an error. To unhide rows, * call setRows(). * @example If you have a table with 10 rows, and you call setRows([2,7,1,7,9]), * and then hideRows([7,9]), the rows in the view will then be [2,1]. * @param array $rowIndexes * @return void */ public function hideRows($rowIndexes = null) { $this->properties[__FUNCTION__][] = Google_Base::toJson($rowIndexes); }
/** * @return string */ public function __toString() { $string = ''; $string .= $this->provider; $string .= '.'; $string .= $this->type; $string .= '('; $string .= "'" . $this->scope . "',"; $string .= "'" . $this->version . "',"; $string .= !empty($this->properties) ? Google_Base::toJson($this->properties) : ''; $string .= ');'; return $string; }
/** * setRows * @desc Sets the rows in this view based on indexes from the underlying * table/view. rowIndexes should be an array of numbers, greater than or * equal to zero, and less than the number of rows as returned by the * getNumberOfRows() method of the underlying table/view. The specified row * indexes are the indexes in the underlying table/view, which will be in * the view, in the specified order. Note that only the rows specified in * rowIndexes will bw shown; this method clears all other rows from the view. * The array can also contain duplicates, effectively duplicating the specified * row in this view (for example, setRows([3, 4, 3, 2]) will cause row 3 to * appear twice in this view). The array thus provides a mapping of the rows * from the underlying table/view to this view. * @example To create a view with rows three and zero of an underlying * table/view: view.setRows([3, 0]) * @param array|int $rowIndexes * @param int $max * @return void */ public function setRows($rowIndexes, $max = null) { if (is_integer($max) and is_integer($rowIndexes)) { $this->properties[__FUNCTION__][] = '[' . $rowIndexes . ',' . $max . ']'; } else { $this->properties[__FUNCTION__][] = Google_Base::toJson($rowIndexes); } }
/** * @TODO check for removal * @return string */ public function getData() { return Google_Base::toJson($this->configObject); }
/** * @desc table date formatter template * @return string */ public function __toString() { $string = 'var formatter' . $this->prefix . '=new '; $string .= $this->provider; $string .= '.'; $string .= $this->scope; $string .= '.'; $string .= $this->type; $string .= '(' . (!empty($this->properties) ? Google_Base::toJson($this->properties) : '') . ');'; $string .= "\n"; $string .= 'formatter' . $this->prefix . '.format(' . $this->dataTable . ', ' . $this->srcColumnIndices . ');'; $string .= "\n"; return $string; }
/** * __toString * @return string */ public function __toString() { $string = 'var formatter=new '; $string .= $this->provider; $string .= '.'; $string .= $this->scope; $string .= '.'; $string .= $this->type; $string .= '(\'' . (!empty($this->pattern) ? (string) $this->pattern : '') . '\');'; $string .= "\n"; if (empty($this->opt_dstColumnIndex)) { $string .= 'formatter.format(' . $this->dataTable . ', ' . Google_Base::toJson($this->srcColumnIndices) . ');'; } else { $string .= 'formatter.format(' . $this->dataTable . ', ' . Google_Base::toJson($this->srcColumnIndices) . ', ' . Google_Config::toJson($this->opt_dstColumnIndex) . ');'; } $string .= "\n"; return $string; }