Piwik\DataTable\Row::getSubtable PHP Method

getSubtable() public method

Returns the associated subtable, if one exists. Returns false if none exists.
public getSubtable ( ) : DataTable | boolean
return Piwik\DataTable | boolean
    public function getSubtable()
    {
        if ($this->isSubtableLoaded) {
            try {
                return Manager::getInstance()->getTable($this->subtableId);
            } catch (TableNotFoundException $e) {
                // edge case
            }
        }
        return false;
    }

Usage Example

示例#1
0
 /**
  * Filters a row's subtable, if one exists and is loaded in memory.
  *
  * @param Row $row The row whose subtable should be filter.
  */
 public function filterSubTable(Row $row)
 {
     if (!$this->enableRecursive) {
         return;
     }
     $subTable = $row->getSubtable();
     if ($subTable) {
         $this->filter($subTable);
     }
 }
All Usage Examples Of Piwik\DataTable\Row::getSubtable