Returns the viewDataTable IDs of a visualization's class lineage.
public static getIdsWithInheritance ( string $klass ) : array | ||
$klass | string | The visualization class. |
return | array |
/** * Returns `true` if this instance's or any of its ancestors' viewDataTable IDs equals the supplied ID, * `false` if otherwise. * * Can be used to test whether a ViewDataTable object is an instance of a certain visualization or not, * without having to know where that visualization is. * * @param string $viewDataTableId The viewDataTable ID to check for, eg, `'table'`. * @return bool */ public function isViewDataTableId($viewDataTableId) { $myIds = ViewDataTableManager::getIdsWithInheritance(get_called_class()); return in_array($viewDataTableId, $myIds); }