public static function getClassLineage($class) { $classes = array_merge(array($class), array_values(class_parents($class, $autoload = false))); return array_reverse($classes); }
/** * Returns the viewDataTable IDs of a visualization's class lineage. * * @see self::getVisualizationClassLineage * * @param string $klass The visualization class. * * @return array */ public static function getIdsWithInheritance($klass) { $klasses = Common::getClassLineage($klass); $result = array(); foreach ($klasses as $klass) { try { $result[] = $klass::getViewDataTableId(); } catch (\Exception $e) { // in case $klass did not define an id: eg Plugin\ViewDataTable continue; } } return $result; }